diff options
author | B. Stack <bgstack15@gmail.com> | 2022-09-07 18:49:36 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-09-07 18:49:36 +0000 |
commit | 62bcefb8b809a32c6d26ab04ca686578bba5567a (patch) | |
tree | fbc1dea58a6b28f1af4a9e9b2bc8e3e1d23b2103 /zen/file_access.h | |
parent | Merge branch 'b11.23' into 'master' (diff) | |
parent | add upstream 11.24 (diff) | |
download | FreeFileSync-11.24.tar.gz FreeFileSync-11.24.tar.bz2 FreeFileSync-11.24.zip |
Merge branch 'b11.24' into 'master'11.24
add upstream 11.24
See merge request opensource-tracking/FreeFileSync!47
Diffstat (limited to 'zen/file_access.h')
-rw-r--r-- | zen/file_access.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/zen/file_access.h b/zen/file_access.h index 17c47731..f6a02edc 100644 --- a/zen/file_access.h +++ b/zen/file_access.h @@ -29,12 +29,7 @@ using FileIndex = ino_t; using FileTimeNative = timespec; inline time_t nativeFileTimeToTimeT(const timespec& ft) { return ft.tv_sec; } //follow Windows Explorer and always round down! -inline timespec timetToNativeFileTime(time_t utcTime) -{ - timespec natTime = {}; - natTime.tv_sec = utcTime; - return natTime; -} +inline timespec timetToNativeFileTime(time_t utcTime) { return {.tv_sec = utcTime}; } enum class ItemType { @@ -44,15 +39,14 @@ enum class ItemType }; //(hopefully) fast: does not distinguish between error/not existing ItemType getItemType(const Zstring& itemPath); //throw FileError -//execute potentially SLOW folder traversal but distinguish error/not existing -// assumes: - base path still exists -// - all child item path parts must correspond to folder traversal +//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 enum class ProcSymlink { - direct, + asLink, follow }; void setFileTime(const Zstring& filePath, time_t modTime, ProcSymlink procSl); //throw FileError |