19 #ifndef STD_FILE_MONITOR_H_INC
20 #define STD_FILE_MONITOR_H_INC
26 #import <CoreFoundation/CoreFoundation.h>
27 #import <CoreServices/CoreServices.h>
48 bool Execute(
int iTimeout = -1, pollfd * =
nullptr)
override;
51 #ifdef STDSCHEDULER_USE_EVENTS
52 HANDLE GetEvent()
override;
54 void GetFDs(std::vector<struct pollfd> & FDs)
override;
65 #ifdef HAVE_SYS_INOTIFY_H
67 std::map<int, const char *> watch_descriptors;
82 void HandleNotify(
const char *szDir,
const struct _FILE_NOTIFY_INFORMATION *pNotify);
83 #elif defined(__APPLE__)
84 FSEventStreamRef eventStream;
85 FSEventStreamContext context;
void GetFDs(std::vector< struct pollfd > &FDs) override
void OnThreadEvent(C4InteractiveEventType eEvent, void *pEventData) override
void(* ChangeNotify)(const char *, const char *)
bool Execute(int iTimeout=-1, pollfd *=nullptr) override
~C4FileMonitor() override
void AddDirectory(const char *szDir)
C4FileMonitor(ChangeNotify pCallback)