summaryrefslogtreecommitdiff
path: root/library/fileHandling.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 16:55:14 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 16:55:14 +0200
commit222024f07e505617aec93dc4837be2be27d18856 (patch)
treec40f400baa6cf1d047205359f80c2b8f74a2b507 /library/fileHandling.h
parent1.12 (diff)
downloadFreeFileSync-222024f07e505617aec93dc4837be2be27d18856.tar.gz
FreeFileSync-222024f07e505617aec93dc4837be2be27d18856.tar.bz2
FreeFileSync-222024f07e505617aec93dc4837be2be27d18856.zip
1.13
Diffstat (limited to 'library/fileHandling.h')
-rw-r--r--library/fileHandling.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/library/fileHandling.h b/library/fileHandling.h
new file mode 100644
index 00000000..a4f43391
--- /dev/null
+++ b/library/fileHandling.h
@@ -0,0 +1,37 @@
+#ifndef RECYCLER_H_INCLUDED
+#define RECYCLER_H_INCLUDED
+
+#include "globalFunctions.h"
+#include <wx/dir.h>
+
+
+class FileError //Exception class used to notify file/directory copy/delete errors
+{
+public:
+ FileError(const wxString& txt) : errorMessage(txt) {}
+
+ wxString show() const
+ {
+ return errorMessage;
+ }
+
+private:
+ wxString errorMessage;
+};
+
+
+namespace FreeFileSync
+{
+ void getAllFilesAndDirs(const wxString& sourceDir, wxArrayString& files, wxArrayString& directories) throw(FileError);
+
+ //recycler
+ bool recycleBinExists(); //test existence of Recycle Bin API on current system
+
+ //file handling
+ void removeDirectory(const wxString& directory, const bool useRecycleBin);
+ void removeFile(const wxString& filename, const bool useRecycleBin);
+ void createDirectory(const wxString& directory, int level = 0); //level is used internally only
+}
+
+
+#endif // RECYCLER_H_INCLUDED
bgstack15