From a53560254596460a4778a27f50b89ce92f810055 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 19 Oct 2022 10:53:07 -0400 Subject: add upstream 11.27 --- zen/file_access.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'zen/file_access.h') 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: -- cgit