summaryrefslogtreecommitdiff
path: root/zen/file_access.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-03-12 16:09:20 -0400
committerB Stack <bgstack15@gmail.com>2019-03-12 16:09:20 -0400
commit27177c9cbc47d4114ccee56015fb0407e7e258cc (patch)
treedc226d83311470a23cdf0c02064feb525fcc5096 /zen/file_access.h
parentMerge branch '10.9' into 'master' (diff)
downloadFreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.tar.gz
FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.tar.bz2
FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.zip
10.10
Diffstat (limited to 'zen/file_access.h')
-rw-r--r--zen/file_access.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/zen/file_access.h b/zen/file_access.h
index e06c64ac..fc4b5833 100644
--- a/zen/file_access.h
+++ b/zen/file_access.h
@@ -52,17 +52,10 @@ enum class ProcSymlink
};
void setFileTime(const Zstring& filePath, time_t modTime, ProcSymlink procSl); //throw FileError
-//symlink handling: always follow
+//symlink handling: always follow:
uint64_t getFreeDiskSpace(const Zstring& path); //throw FileError, returns 0 if not available
-
-struct FileDetails
-{
- uint64_t fileSize = 0;
- time_t modTime = 0; //number of seconds since Jan. 1st 1970 UTC
- VolumeId volumeId = 0;
-};
-//symlink handling: always follow
-FileDetails getFileDetails(const Zstring& itemPath); //throw FileError
+VolumeId getVolumeId(const Zstring& itemPath); //throw FileError
+uint64_t getFileSize(const Zstring& filePath); //throw FileError
//get per-user directory designated for temporary files:
Zstring getTempFolderPath(); //throw FileError
@@ -72,7 +65,7 @@ void removeSymlinkPlain (const Zstring& linkPath); //throw FileError; E
void removeDirectoryPlain(const Zstring& dirPath ); //throw FileError; ERROR if not existing
void removeDirectoryPlainRecursion(const Zstring& dirPath); //throw FileError; ERROR if not existing
-void moveAndRenameItem(const Zstring& itemPathOld, const Zstring& itemPathNew, bool replaceExisting); //throw FileError, ErrorDifferentVolume, ErrorTargetExisting
+void moveAndRenameItem(const Zstring& pathFrom, const Zstring& pathTo, bool replaceExisting); //throw FileError, ErrorMoveUnsupported, ErrorTargetExisting
bool supportsPermissions(const Zstring& dirPath); //throw FileError, follows symlinks
//copy permissions for files, directories or symbolic links: requires admin rights
@@ -89,7 +82,7 @@ void createDirectoryIfMissingRecursion(const Zstring& dirPath); //throw FileErro
//reports note-worthy errors only
void tryCopyDirectoryAttributes(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError
-void copySymlink(const Zstring& sourceLink, const Zstring& targetLink, bool copyFilePermissions); //throw FileError
+void copySymlink(const Zstring& sourcePath, const Zstring& targetPath, bool copyFilePermissions); //throw FileError
struct FileCopyResult
{
bgstack15