diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:59 +0200 |
commit | d4af25c52a28b93484ffb55e0a8027bc4ce7856f (patch) | |
tree | 853d57468d6b370711e7a5dd2c3dc7d5bac81b10 /zen/IFileOperation/file_op.h | |
parent | 5.8 (diff) | |
download | FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.gz FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.bz2 FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.zip |
5.9
Diffstat (limited to 'zen/IFileOperation/file_op.h')
-rw-r--r-- | zen/IFileOperation/file_op.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/zen/IFileOperation/file_op.h b/zen/IFileOperation/file_op.h index 86efc340..2f5d6f30 100644 --- a/zen/IFileOperation/file_op.h +++ b/zen/IFileOperation/file_op.h @@ -25,9 +25,15 @@ namespace fileop //COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize //minimum OS: Windows Vista or later +//return false to abort operation +typedef bool (*RecyclerCallback)(const wchar_t* filename, //current item; may be empty string! + void* sink); //virtual function mechanism is not guaranteed to be compatible between different compilers, therefore we go the C-way + DLL_FUNCTION_DECLARATION bool moveToRecycleBin(const wchar_t* fileNames[], - size_t fileNo); //size of fileNames array + size_t fileCount, //size of fileNames array + RecyclerCallback callback, //optional + void* sink); // DLL_FUNCTION_DECLARATION bool copyFile(const wchar_t* sourceFile, @@ -49,7 +55,10 @@ const wchar_t* getLastError(); //no nullptr check required! /*---------- |typedefs| ----------*/ -typedef bool (*FunType_moveToRecycleBin)(const wchar_t* fileNames[], size_t fileNo); +typedef bool (*FunType_moveToRecycleBin)(const wchar_t* fileNames[], + size_t fileCount, + RecyclerCallback callback, + void* sink); typedef bool (*FunType_copyFile)(const wchar_t* sourceFile, const wchar_t* targetFile); typedef bool (*FunType_checkRecycler)(const wchar_t* dirname, bool& isRecycler); typedef bool (*FunType_getLockingProcesses)(const wchar_t* filename, const wchar_t*& procList); |