CernVM-FS
2.12.0
|
#include <file_watcher.h>
Public Member Functions | |
EventHandler () | |
virtual | ~EventHandler () |
virtual bool | Handle (const std::string &file_path, Event event, bool *clear_handler)=0 |
Definition at line 25 of file file_watcher.h.
file_watcher::EventHandler::EventHandler | ( | ) |
Definition at line 26 of file file_watcher.cc.
|
virtual |
Definition at line 28 of file file_watcher.cc.
|
pure virtual |
Handle function called per event
file_path | - the path of the file this event corresponds to |
event | - the type of event |
clear_handler | - (output) set this to true to have the event handler remove from the loop after this call |
Should return false in case of failure.
Setting the clear_handler parameter to false means that the FileWatcher object will attempt to re-register the handler for the same file name in the case a file was delete - useful for continuously watching a file which may be deleted and recreated
Implemented in ResolvConfEventHandler.
Referenced by file_watcher::FileWatcherInotify::RunEventLoop(), and file_watcher::FileWatcherKqueue::RunEventLoop().