summaryrefslogtreecommitdiff
path: root/zen/file_handling.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:55 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:55 +0200
commitc4182431ac7d9d306fdd2267e082fa4cec6fec2c (patch)
tree865cca543c062b7af2586f85cee19f9af4e7614d /zen/file_handling.h
parent5.11 (diff)
downloadFreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.gz
FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.bz2
FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.zip
5.12
Diffstat (limited to 'zen/file_handling.h')
-rw-r--r--zen/file_handling.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/zen/file_handling.h b/zen/file_handling.h
index e9e1685d..5739dc2a 100644
--- a/zen/file_handling.h
+++ b/zen/file_handling.h
@@ -47,7 +47,7 @@ UInt64 getFilesize(const Zstring& filename); //throw FileError
UInt64 getFreeDiskSpace(const Zstring& path); //throw FileError
//file handling
-bool removeFile(const Zstring& filename); //throw FileError; return "true" if file was actually deleted
+bool removeFile(const Zstring& filename); //throw FileError; return "false" if file is not existing
void removeDirectory(const Zstring& directory, CallbackRemoveDir* callback = nullptr); //throw FileError
//rename file or directory: no copying!!!
@@ -57,7 +57,7 @@ bool supportsPermissions(const Zstring& dirname); //throw FileError, derefernces
//creates superdirectories automatically:
void makeDirectory(const Zstring& directory); //throw FileError; do nothing if directory already exists!
-void makeNewDirectory(const Zstring& directory, const Zstring& templateDir, bool copyFilePermissions); //FileError, ErrorTargetExisting
+void makeNewDirectory(const Zstring& directory, const Zstring& templateDir, bool copyFilePermissions); //throw FileError, ErrorTargetExisting
struct FileAttrib
{
@@ -85,16 +85,15 @@ void copySymlink(const Zstring& sourceLink, const Zstring& targetLink, bool copy
struct CallbackRemoveDir
{
virtual ~CallbackRemoveDir() {}
- virtual void notifyFileDeletion(const Zstring& filename) = 0; //one call for each (existing) object!
- virtual void notifyDirDeletion (const Zstring& dirname ) = 0; //
+ virtual void onBeforeFileDeletion(const Zstring& filename) = 0; //one call for each *existing* object!
+ virtual void onBeforeDirDeletion (const Zstring& dirname ) = 0; //
};
-
struct CallbackCopyFile
{
virtual ~CallbackCopyFile() {}
- //if target is existing user needs to implement deletion: copyFile() NEVER deletes target if already existing!
+ //if target is existing user needs to implement deletion: copyFile() NEVER overwrites target if already existing!
//if transactionalCopy == true, full read access on source had been proven at this point, so it's safe to delete it.
virtual void deleteTargetFile(const Zstring& targetFile) = 0; //may throw exceptions
bgstack15