summaryrefslogtreecommitdiff
path: root/shared/file_handling.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:46 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:46 +0200
commitb338e29fd3eaf700f8c8360aa0310048ba941d54 (patch)
tree122f8ef3790d12cd10275ef7453a9e8053322d78 /shared/file_handling.h
parent3.18 (diff)
downloadFreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.tar.gz
FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.tar.bz2
FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.zip
3.19
Diffstat (limited to 'shared/file_handling.h')
-rw-r--r--shared/file_handling.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/shared/file_handling.h b/shared/file_handling.h
index 67540de5..0ee4b1e9 100644
--- a/shared/file_handling.h
+++ b/shared/file_handling.h
@@ -37,7 +37,7 @@ ResponseSameVol onSameVolume(const Zstring& folderLeft, const Zstring& folderRig
void copyFileTimes(const Zstring& sourceDir, const Zstring& targetDir, bool derefSymlinks); //throw (FileError)
//symlink handling: always evaluate target
-zen::UInt64 getFilesize(const Zstring& filename); //throw (FileError)
+UInt64 getFilesize(const Zstring& filename); //throw (FileError)
//file handling
@@ -88,19 +88,6 @@ struct CallbackRemoveDir
};
-struct CallbackMoveFile //callback functionality
-{
- virtual ~CallbackMoveFile() {}
-
- enum Response
- {
- CONTINUE,
- CANCEL
- };
- virtual Response requestUiRefresh(const Zstring& currentObject) = 0; //DON'T throw exceptions here, at least in Windows build!
-};
-
-
struct CallbackCopyFile //callback functionality
{
virtual ~CallbackCopyFile() {}
@@ -109,12 +96,17 @@ struct CallbackCopyFile //callback functionality
//at this point full read access on source had been proven, so it's safe to delete it.
virtual void deleteTargetFile(const Zstring& targetFile) = 0; //may throw exceptions
- enum Response
- {
- CONTINUE,
- CANCEL
- };
- virtual Response updateCopyStatus(zen::UInt64 totalBytesTransferred) = 0; //DON'T throw exceptions here, at least in Windows build!
+ //may throw:
+ //Linux: unconditionally
+ //Windows: first exception is swallowed, requestUiRefresh() is then called again where it may throw again and exception will propagate as expected
+ virtual void updateCopyStatus(UInt64 totalBytesTransferred) = 0;
+};
+
+
+struct CallbackMoveFile //callback functionality
+{
+ virtual ~CallbackMoveFile() {}
+ virtual void requestUiRefresh(const Zstring& currentObject) = 0; //see CallbackCopyFile!
};
}
bgstack15