23 #ifndef __UTILS_SYSTEM_FAM_H_ 24 #define __UTILS_SYSTEM_FAM_H_ 26 #include <core/utils/lock_list.h> 28 #include <sys/types.h> 68 virtual void fam_event(
const char *filename,
unsigned int mask) = 0;
77 void watch_dir(
const char *dirpath);
78 void watch_file(
const char *filepath);
79 void add_filter(
const char *regex);
82 void process_events(
int timeout = 0);
96 size_t __inotify_bufsize;
98 std::map<int, std::string> __inotify_watches;
99 std::map<int, std::string>::iterator __inotify_wit;
102 bool __interruptible;
Fawkes library namespace.
static const unsigned int FAM_UNMOUNT
Backing fs was unmounted.
static const unsigned int FAM_ONESHOT
Only send event once.
static const unsigned int FAM_CREATE
Subfile was created.
virtual void fam_event(const char *filename, unsigned int mask)=0
Event has been raised.
static const unsigned int FAM_ISDIR
Event occurred against dir.
static const unsigned int FAM_MOVE
Moves.
static const unsigned int FAM_OPEN
File was opened.
static const unsigned int FAM_ACCESS
File was accessed.
static const unsigned int FAM_IGNORED
File was ignored.
static const unsigned int FAM_Q_OVERFLOW
Event queued overflowed.
static const unsigned int FAM_ONLYDIR
Only watch the path if it is a directory.
static const unsigned int FAM_MASK_ADD
Add to the mask of an already existing watch.
File Alteration Monitor Listener.
Monitors files for changes.
static const unsigned int FAM_MOVE_SELF
Self was moved.
static const unsigned int FAM_MOVED_FROM
File was moved from X.
static const unsigned int FAM_MOVED_TO
File was moved to Y.
static const unsigned int FAM_DELETE_SELF
Self was deleted.
static const unsigned int FAM_ALL_EVENTS
All events which a program can wait on.
static const unsigned int FAM_CLOSE_NOWRITE
Unwrittable file closed.
static const unsigned int FAM_DELETE
Subfile was deleted.
static const unsigned int FAM_MODIFY
File was modified.
static const unsigned int FAM_DONT_FOLLOW
Do not follow a sym link.
static const unsigned int FAM_ATTRIB
Metadata changed.
virtual ~FamListener()
Virtual empty destructor.
static const unsigned int FAM_CLOSE_WRITE
Writtable file was closed.
static const unsigned int FAM_CLOSE
Close.