diff options
author | B. Stack <bgstack15@gmail.com> | 2023-01-22 13:56:55 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-01-22 13:56:55 -0500 |
commit | 75e05bc441382db69c842a64c562738cb749214e (patch) | |
tree | 698b60b3b4b914bf7958cf1174d0373909bf1e8f /zen/file_access.h | |
parent | add upstream 11.29 (diff) | |
download | FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.gz FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.bz2 FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.zip |
add upstream 12.0
Diffstat (limited to 'zen/file_access.h')
-rw-r--r-- | zen/file_access.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/zen/file_access.h b/zen/file_access.h index d87fcd0d..5af8b879 100644 --- a/zen/file_access.h +++ b/zen/file_access.h @@ -8,6 +8,7 @@ #define FILE_ACCESS_H_8017341345614857 #include <functional> +#include <variant> #include "file_path.h" #include "file_error.h" #include "serialize.h" //IoCallback @@ -17,10 +18,6 @@ namespace zen { //note: certain functions require COM initialization! (vista_file_op.h) -//POSITIVE existence checks; if false: 1. item not existing 2. different type 3.device access error or similar -bool fileAvailable(const Zstring& filePath); //noexcept -bool dirAvailable (const Zstring& dirPath ); // - //FAT/FAT32: "Why does the timestamp of a file *increase* by up to 2 seconds when I copy it to a USB thumb drive?" const int FAT_FILE_TIME_PRECISION_SEC = 2; //https://devblogs.microsoft.com/oldnewthing/?p=83 //https://web.archive.org/web/20141127143832/http://support.microsoft.com/kb/127830 @@ -42,7 +39,9 @@ ItemType getItemType(const Zstring& itemPath); //throw FileError //execute potentially SLOW folder traversal but distinguish error/not existing: // - all child item path parts must correspond to folder traversal // => we can conclude whether an item is *not* existing anymore by doing a *case-sensitive* name search => potentially SLOW! -std::optional<ItemType> itemStillExists(const Zstring& itemPath); //throw FileError +std::variant<ItemType, Zstring /*last existing parent path*/> getItemTypeIfExists(const Zstring& itemPath); //throw FileError + +bool itemExists(const Zstring& itemPath); //throw FileError enum class ProcSymlink { |