summaryrefslogtreecommitdiff
path: root/zen/file_path.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-01-22 13:56:55 -0500
committerB. Stack <bgstack15@gmail.com>2023-01-22 13:56:55 -0500
commit75e05bc441382db69c842a64c562738cb749214e (patch)
tree698b60b3b4b914bf7958cf1174d0373909bf1e8f /zen/file_path.h
parentadd upstream 11.29 (diff)
downloadFreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.gz
FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.bz2
FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.zip
add upstream 12.0
Diffstat (limited to 'zen/file_path.h')
-rw-r--r--zen/file_path.h5
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!)
bgstack15