From c95b3937fef3e2c63768f1b3b1dc2c898f23d91d Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 22 Jul 2020 11:37:03 -0400 Subject: add upstream 11.0 --- zen/file_access.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'zen/file_access.h') diff --git a/zen/file_access.h b/zen/file_access.h index 66c41fbd..a3fa56d7 100644 --- a/zen/file_access.h +++ b/zen/file_access.h @@ -52,7 +52,7 @@ enum class ProcSymlink }; void setFileTime(const Zstring& filePath, time_t modTime, ProcSymlink procSl); //throw FileError -//symlink handling: always follow: +//symlink handling: follow int64_t getFreeDiskSpace(const Zstring& path); //throw FileError, returns < 0 if not available VolumeId getVolumeId(const Zstring& itemPath); //throw FileError uint64_t getFileSize(const Zstring& filePath); //throw FileError @@ -73,16 +73,16 @@ void copyItemPermissions(const Zstring& sourcePath, const Zstring& targetPath, P void createDirectory(const Zstring& dirPath); //throw FileError, ErrorTargetExisting -//- no error if already existing -//- create recursively if parent directory is not existing -void createDirectoryIfMissingRecursion(const Zstring& dirPath); //throw FileError +//creates directories recursively if not existing +//returns false if folder already exists +bool createDirectoryIfMissingRecursion(const Zstring& dirPath); //throw FileError -//symlink handling: follow link! +//symlink handling: follow //expects existing source/target directories -//reports note-worthy errors only +//reports "note-worthy" errors only void tryCopyDirectoryAttributes(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError -void copySymlink(const Zstring& sourcePath, const Zstring& targetPath, bool copyFilePermissions); //throw FileError +void copySymlink(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError struct FileCopyResult { @@ -93,7 +93,7 @@ struct FileCopyResult std::optional errorModTime; //failure to set modification time }; -FileCopyResult copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, bool copyFilePermissions, //throw FileError, ErrorTargetExisting, ErrorFileLocked, X +FileCopyResult copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, //throw FileError, ErrorTargetExisting, ErrorFileLocked, X //accummulated delta != file size! consider ADS, sparse, compressed files const IOCallback& notifyUnbufferedIO /*throw X*/); -- cgit