summaryrefslogtreecommitdiff
path: root/zen/file_access.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2017-04-20 17:05:29 -0600
committerDaniel Wilhelm <shieldwed@outlook.com>2017-04-20 17:05:29 -0600
commit94eeff901cb5f3d435840a662b4438c631127183 (patch)
tree7a4e7ed4627fb2ddfa3ef5176b7b35981b52c51f /zen/file_access.h
parentnormalize most lineendings (diff)
downloadFreeFileSync-94eeff901cb5f3d435840a662b4438c631127183.tar.gz
FreeFileSync-94eeff901cb5f3d435840a662b4438c631127183.tar.bz2
FreeFileSync-94eeff901cb5f3d435840a662b4438c631127183.zip
9.0
Diffstat (limited to 'zen/file_access.h')
-rwxr-xr-xzen/file_access.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/zen/file_access.h b/zen/file_access.h
index ee33da93..a06e5b17 100755
--- a/zen/file_access.h
+++ b/zen/file_access.h
@@ -56,7 +56,7 @@ enum class ProcSymlink
DIRECT,
FOLLOW
};
-void setFileTime(const Zstring& filePath, int64_t modificationTime, ProcSymlink procSl); //throw FileError
+void setFileTime(const Zstring& filePath, int64_t modTime, ProcSymlink procSl); //throw FileError
//symlink handling: always evaluate target
uint64_t getFileSize(const Zstring& filePath); //throw FileError
@@ -85,17 +85,18 @@ void copyNewDirectory(const Zstring& sourcePath, const Zstring& targetPath, bool
void copySymlink(const Zstring& sourceLink, const Zstring& targetLink, bool copyFilePermissions); //throw FileError
-struct InSyncAttributes
+struct FileCopyResult
{
uint64_t fileSize = 0;
- int64_t modificationTime = 0; //time_t UTC compatible
+ int64_t modTime = 0; //time_t-compatible (UTC)
FileId sourceFileId;
FileId targetFileId;
+ Opt<FileError> errorModTime; //failure to set modification time
};
-InSyncAttributes copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, bool copyFilePermissions, //throw FileError, ErrorTargetExisting, ErrorFileLocked
- //accummulated delta != file size! consider ADS, sparse, compressed files
- const IOCallback& notifyUnbufferedIO); //may be nullptr; throw X!
+FileCopyResult copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, bool copyFilePermissions, //throw FileError, ErrorTargetExisting, ErrorFileLocked
+ //accummulated delta != file size! consider ADS, sparse, compressed files
+ const IOCallback& notifyUnbufferedIO); //may be nullptr; throw X!
}
#endif //FILE_ACCESS_H_8017341345614857
bgstack15