diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp index c00c586c..48e6be42 100644 --- a/src/common/file_system.cpp +++ b/src/common/file_system.cpp @@ -213,12 +213,7 @@ static std::string_view::size_type GetLastSeperatorPosition(const std::string_vi return last_separator; } -std::string GetDisplayNameFromPath(const std::string_view& path) -{ - return std::string(GetFileNameFromPath(path)); -} - -std::string_view GetFileNameFromPath(const std::string_view& path) +static std::string_view GetFileNameFromPath(const std::string_view& path) { std::string_view::size_type pos = GetLastSeperatorPosition(path, true); if (pos == std::string_view::npos) @@ -227,6 +222,11 @@ std::string_view GetFileNameFromPath(const std::string_view& path) return path.substr(pos); } +std::string GetDisplayNameFromPath(const std::string_view& path) +{ + return std::string(GetFileNameFromPath(path)); +} + std::string_view GetFileTitleFromPath(const std::string_view& path) { std::string_view filename(GetFileNameFromPath(path)); diff --git a/src/common/file_system.h b/src/common/file_system.h index 4fde7430..f496c3a0 100644 --- a/src/common/file_system.h +++ b/src/common/file_system.h @@ -54,9 +54,6 @@ std::string ReplaceExtension(const std::string_view& path, const std::string_vie /// where it resolves a content URI to its name. std::string GetDisplayNameFromPath(const std::string_view& path); -/// Returns the filename component of a filename. -std::string_view GetFileNameFromPath(const std::string_view& path); - /// Returns the file title (less the extension and path) from a filename. std::string_view GetFileTitleFromPath(const std::string_view& path);