From 222024f07e505617aec93dc4837be2be27d18856 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 16:55:14 +0200 Subject: 1.13 --- library/fileHandling.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 library/fileHandling.h (limited to 'library/fileHandling.h') 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 + + +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 -- cgit