summaryrefslogtreecommitdiff
path: root/zen/IFileOperation/file_op.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/IFileOperation/file_op.h')
-rw-r--r--zen/IFileOperation/file_op.h13
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);
bgstack15