summaryrefslogtreecommitdiff
path: root/zen/file_access.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-10-19 10:53:07 -0400
committerB. Stack <bgstack15@gmail.com>2022-10-19 10:53:07 -0400
commita53560254596460a4778a27f50b89ce92f810055 (patch)
tree551fdc08cbece3cca567d04870b91eaa115a4675 /zen/file_access.h
parentMerge branch 'b11.26' into 'master' (diff)
downloadFreeFileSync-11.27.tar.gz
FreeFileSync-11.27.tar.bz2
FreeFileSync-11.27.zip
add upstream 11.2711.27
Diffstat (limited to 'zen/file_access.h')
-rw-r--r--zen/file_access.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/zen/file_access.h b/zen/file_access.h
index 639abf64..d87fcd0d 100644
--- a/zen/file_access.h
+++ b/zen/file_access.h
@@ -28,7 +28,7 @@ const int FAT_FILE_TIME_PRECISION_SEC = 2; //https://devblogs.microsoft.com/oldn
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 time_t nativeFileTimeToTimeT(const timespec& ft) { return ft.tv_sec; } //follow Windows Explorer: always round down!
inline timespec timetToNativeFileTime(time_t utcTime) { return {.tv_sec = utcTime}; }
enum class ItemType
@@ -51,8 +51,13 @@ enum class ProcSymlink
};
void setFileTime(const Zstring& filePath, time_t modTime, ProcSymlink procSl); //throw FileError
+
+int64_t getFreeDiskSpace(const Zstring& folderPath); //throw FileError, returns < 0 if not available
+//- symlink handling: follow
+//- returns < 0 if not available
+//- folderPath does not need to exist (yet)
+
//symlink handling: follow
-int64_t getFreeDiskSpace(const Zstring& path); //throw FileError, returns < 0 if not available
uint64_t getFileSize(const Zstring& filePath); //throw FileError
//get per-user directory designated for temporary files:
bgstack15