diff options
Diffstat (limited to 'zen/file_path.h')
-rw-r--r-- | zen/file_path.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zen/file_path.h b/zen/file_path.h index 85af251d..d67a49d0 100644 --- a/zen/file_path.h +++ b/zen/file_path.h @@ -22,6 +22,9 @@ struct PathComponents std::optional<PathComponents> parsePathComponents(const Zstring& itemPath); //no value on failure std::optional<Zstring> getParentFolderPath(const Zstring& itemPath); +inline Zstring getItemName(const Zstring& itemPath) { return afterLast(itemPath, FILE_NAME_SEPARATOR, IfNotFoundReturn::all); } + +Zstring getFileExtension(const ZstringView filePath); Zstring appendSeparator(Zstring path); //support rvalue references! @@ -29,8 +32,6 @@ bool isValidRelPath(const Zstring& relPath); Zstring appendPath(const Zstring& basePath, const Zstring& relPath); -Zstring getFileExtension(const Zstring& filePath); - //------------------------------------------------------------------------------------------ /* Compare *local* file paths: Windows: igore case (but distinguish Unicode normalization forms!) |