diff options
Diffstat (limited to 'zen/dir_watcher.cpp')
-rw-r--r-- | zen/dir_watcher.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/zen/dir_watcher.cpp b/zen/dir_watcher.cpp index 7d5e4697..0b34f890 100644 --- a/zen/dir_watcher.cpp +++ b/zen/dir_watcher.cpp @@ -19,6 +19,9 @@ #include <sys/inotify.h> #include <fcntl.h> #include "file_traverser.h" + +#elif defined FFS_MAC +//#include <CoreFoundation/FSEvents.h> #endif using namespace zen; @@ -133,7 +136,7 @@ class ReadChangesAsync { public: //constructed in main thread! - ReadChangesAsync(const Zstring& directory, //make sure to not leak in thread-unsafe types! + ReadChangesAsync(const Zstring& directory, //make sure to not leak-in thread-unsafe types! const std::shared_ptr<SharedData>& shared) : shared_(shared), dirnamePf(appendSeparator(directory)), @@ -510,11 +513,35 @@ std::vector<DirWatcher::Entry> DirWatcher::getChanges(const std::function<void() output.push_back(Entry(ACTION_DELETE, fullname)); } } - bytePos += sizeof(struct ::inotify_event) + evt.len; } return output; } +#elif defined FFS_MAC + +warn_static("finish") +struct DirWatcher::Pimpl +{ + +}; + + +DirWatcher::DirWatcher(const Zstring& directory) //throw FileError +{ + +} + + +DirWatcher::~DirWatcher() +{ +} + + +std::vector<DirWatcher::Entry> DirWatcher::getChanges(const std::function<void()>&) //throw FileError +{ + std::vector<Entry> output; + return output; +} #endif |