summaryrefslogtreecommitdiff
path: root/zen/recycler.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:59 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:59 +0200
commitd4af25c52a28b93484ffb55e0a8027bc4ce7856f (patch)
tree853d57468d6b370711e7a5dd2c3dc7d5bac81b10 /zen/recycler.h
parent5.8 (diff)
downloadFreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.gz
FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.bz2
FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.zip
5.9
Diffstat (limited to 'zen/recycler.h')
-rw-r--r--zen/recycler.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/zen/recycler.h b/zen/recycler.h
index cdadf371..4d33477d 100644
--- a/zen/recycler.h
+++ b/zen/recycler.h
@@ -7,6 +7,7 @@
#ifndef RECYCLER_H_INCLUDED
#define RECYCLER_H_INCLUDED
+#include <vector>
#include <zen/file_error.h>
#include <zen/zstring.h>
@@ -40,8 +41,18 @@ enum StatusRecycler
STATUS_REC_MISSING,
STATUS_REC_UNKNOWN
};
-
StatusRecycler recycleBinStatus(const Zstring& pathName); //test existence of Recycle Bin API for certain path
+
+struct CallbackRecycling
+{
+ virtual ~CallbackRecycling() {}
+
+ //may throw: first exception is swallowed, updateStatus() is then called again where it should throw again and the exception will propagate as expected
+ virtual void updateStatus(const Zstring& currentItem) = 0;
+};
+
+void recycleOrDelete(const std::vector<Zstring>& filenames, //throw FileError, return "true" if file/dir was actually deleted
+ CallbackRecycling* callback); //optional
#endif
}
bgstack15