26 #ifndef FSW_INOTIFY_MONITOR_H 27 # define FSW_INOTIFY_MONITOR_H 30 # include <sys/inotify.h> 33 # include <sys/stat.h> 41 struct inotify_monitor_impl;
78 void scan_root_paths();
79 bool is_watched(
const std::string& path)
const;
80 void preprocess_dir_event(
struct inotify_event *
event);
81 void preprocess_event(
struct inotify_event *
event);
82 void preprocess_node_event(
struct inotify_event *
event);
83 void scan(
const std::string& path,
const bool accept_non_dirs =
true);
84 bool add_watch(
const std::string& path,
85 const struct stat& fd_stat);
86 void process_pending_events();
87 void remove_watch(
int fd);
void run()
Executes the monitor loop.
Definition: inotify_monitor.cpp:380
Solaris/Illumos monitor.
Definition: inotify_monitor.hpp:49
void * context
Pointer to context data that will be passed to the monitor::callback.
Definition: monitor.hpp:542
Base class of all monitors.
Definition: monitor.hpp:146
Main namespace of libfswatch.
Definition: event.cpp:23
Type representing a file change event.
Definition: event.hpp:47
Definition: inotify_monitor.cpp:42
inotify_monitor(std::vector< std::string > paths, FSW_EVENT_CALLBACK *callback, void *context=nullptr)
Constructs an instance of this class.
Definition: inotify_monitor.cpp:74
virtual ~inotify_monitor()
Destroys an instance of this class.
Definition: inotify_monitor.cpp:89
Header of the fsw::monitor class.
std::vector< std::string > paths
List of paths to watch.
Definition: monitor.hpp:522
FSW_EVENT_CALLBACK * callback
Callback to which change events should be notified.
Definition: monitor.hpp:537
void FSW_EVENT_CALLBACK(const std::vector< event > &, void *)
Function definition of an event callback.
Definition: monitor.hpp:60