26#ifndef FSW_INOTIFY_MONITOR_H
27# define FSW_INOTIFY_MONITOR_H
30# include <sys/inotify.h>
42 struct inotify_monitor_impl;
80 void scan_root_paths();
81 bool is_watched(
const std::string& path)
const;
82 void preprocess_dir_event(
const struct inotify_event *
event);
83 void preprocess_event(
const struct inotify_event *
event);
84 void preprocess_node_event(
const struct inotify_event *
event);
85 void scan(
const std::filesystem::path& path,
bool is_root_path =
false);
86 bool add_watch(
const std::string& path);
87 void process_pending_events();
88 void process_synthetic_events();
89 void remove_watch(
int fd);
91 std::unique_ptr<fsw::inotify_monitor_impl> impl;
Type representing a file change event.
Definition event.hpp:65
Solaris/Illumos monitor.
Definition inotify_monitor.hpp:51
~inotify_monitor() override
Destroys an instance of this class.
Definition inotify_monitor.cpp:188
void on_stop() override
Execute an implementation-specific stop handler.
Definition inotify_monitor.cpp:525
void run() override
Executes the monitor loop.
Definition inotify_monitor.cpp:543
Base class of all monitors.
Definition monitor.hpp:142
std::vector< std::string > paths
List of paths to watch.
Definition monitor.hpp:581
void * context
Pointer to context data that will be passed to the monitor::callback.
Definition monitor.hpp:601
FSW_EVENT_CALLBACK * callback
Callback to which change events should be notified.
Definition monitor.hpp:596
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:58