diff options
Diffstat (limited to 'shared/fileTraverser.h')
-rw-r--r-- | shared/fileTraverser.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/shared/fileTraverser.h b/shared/fileTraverser.h index d2aa7f3e..c1277d87 100644 --- a/shared/fileTraverser.h +++ b/shared/fileTraverser.h @@ -10,55 +10,55 @@ namespace FreeFileSync { - class TraverseCallback - { - public: - virtual ~TraverseCallback() {} - - enum ReturnValue - { - TRAVERSING_STOP, - TRAVERSING_CONTINUE - }; +class TraverseCallback +{ +public: + virtual ~TraverseCallback() {} - struct FileInfo - { - wxULongLong fileSize; //unit: bytes! - wxLongLong lastWriteTimeRaw; //number of seconds since Jan. 1st 1970 UTC - }; + enum ReturnValue + { + TRAVERSING_STOP, + TRAVERSING_CONTINUE + }; - class ReturnValDir - { - public: - //some proxy classes - class Stop {}; - class Ignore {}; - class Continue {}; + struct FileInfo + { + wxULongLong fileSize; //unit: bytes! + wxLongLong lastWriteTimeRaw; //number of seconds since Jan. 1st 1970 UTC + }; - ReturnValDir(const Stop&) : returnCode(TRAVERSING_STOP), subDirCb(NULL) {} - ReturnValDir(const Ignore&) : returnCode(TRAVERSING_IGNORE_DIR), subDirCb(NULL) {} - ReturnValDir(const Continue&, TraverseCallback* subDirCallback) : returnCode(TRAVERSING_CONTINUE), subDirCb(subDirCallback) {} + class ReturnValDir + { + public: + //some proxy classes + class Stop {}; + class Ignore {}; + class Continue {}; + ReturnValDir(const Stop&) : returnCode(TRAVERSING_STOP), subDirCb(NULL) {} + ReturnValDir(const Ignore&) : returnCode(TRAVERSING_IGNORE_DIR), subDirCb(NULL) {} + ReturnValDir(const Continue&, TraverseCallback* subDirCallback) : returnCode(TRAVERSING_CONTINUE), subDirCb(subDirCallback) {} - enum ReturnValueEnh - { - TRAVERSING_STOP, - TRAVERSING_IGNORE_DIR, - TRAVERSING_CONTINUE - }; - const ReturnValueEnh returnCode; - TraverseCallback* const subDirCb; + enum ReturnValueEnh + { + TRAVERSING_STOP, + TRAVERSING_IGNORE_DIR, + TRAVERSING_CONTINUE }; - //overwrite these virtual methods - virtual ReturnValue onError(const wxString& errorText) = 0; - virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details) = 0; - virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName) = 0; + const ReturnValueEnh returnCode; + TraverseCallback* const subDirCb; }; - //custom traverser with detail information about files - void traverseFolder(const Zstring& directory, const bool traverseDirectorySymlinks, TraverseCallback* sink); //throw() + //overwrite these virtual methods + virtual ReturnValue onError(const wxString& errorText) = 0; + virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details) = 0; + virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName) = 0; +}; + +//custom traverser with detail information about files +void traverseFolder(const Zstring& directory, const bool traverseDirectorySymlinks, TraverseCallback* sink); //throw() } #endif // FILETRAVERSER_H_INCLUDED |