26#ifndef FSW_FSEVENT_MONITOR_H
27# define FSW_FSEVENT_MONITOR_H
30# include <CoreServices/CoreServices.h>
84 static void fsevents_callback(ConstFSEventStreamRef streamRef,
85 void *clientCallBackInfo,
88 const FSEventStreamEventFlags eventFlags[],
89 const FSEventStreamEventId eventIds[]);
91 FSEventStreamRef stream =
nullptr;
92 dispatch_queue_t fsevents_queue =
nullptr;
94 void create_stream(CFArrayRef pathsToWatch);
macOS FSEvents monitor.
Definition: fsevents_monitor.hpp:40
fsevents_monitor(std::vector< std::string > paths, FSW_EVENT_CALLBACK *callback, void *context=nullptr)
Constructs an instance of this class.
void run() override
Executes the monitor loop.
Definition: fsevents_monitor.cpp:93
static constexpr const char * DARWIN_EVENTSTREAM_NO_DEFER
Custom monitor property used to enable the kFSEventStreamCreateFlagNoDefer flag in the event stream.
Definition: fsevents_monitor.hpp:62
Base class of all monitors.
Definition: monitor.hpp:148
std::vector< std::string > paths
List of paths to watch.
Definition: monitor.hpp:534
void * context
Pointer to context data that will be passed to the monitor::callback.
Definition: monitor.hpp:554
FSW_EVENT_CALLBACK * callback
Callback to which change events should be notified.
Definition: monitor.hpp:549
Header of the fsw::monitor class.
Main namespace of libfswatch.
Definition: event.cpp:24
void FSW_EVENT_CALLBACK(const std::vector< event > &, void *)
Function definition of an event callback.
Definition: monitor.hpp:61