summaryrefslogtreecommitdiff
path: root/shared/fileTraverser.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:01:29 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:01:29 +0200
commit9a2a524f1e311853d08050be2dcdddc09ac7759a (patch)
treed8e4a24169fce88c2d89931d58514889a0bcb0ea /shared/fileTraverser.h
parent2.3 (diff)
downloadFreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.gz
FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.bz2
FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.zip
3.0
Diffstat (limited to 'shared/fileTraverser.h')
-rw-r--r--shared/fileTraverser.h78
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
bgstack15