Qore fsevent Module
..
|
Ad-hoc file notification handler. More...
Public Member Methods | |
constructor (string path, hash< AbstractFsEventPollerOptionInfo > options=< AbstractFsEventPollerOptionInfo >{}) | |
Construct a file poller. More... | |
abstract | fileEvent (hash< FsEventInfo > event) |
Abstract method called whenever soem filesystem event occurs. More... | |
Private Member Methods | |
setMask (string mask) | |
Set filesystem mask like in shell etc. More... | |
logInfo (string fmt) | |
calls the "log_info" closure or call reference with important information | |
logDetail (string fmt) | |
calls the "log_detail" closure or call reference with detail information | |
logDebug (string fmt) | |
calls the "log_debug" closure or call reference with verbose debugging information | |
initialRun (string path) | |
Called in the constructor to get already existing files/events. | |
Ad-hoc file notification handler.
This class is suitable for atomic file creation; where files are created with their full contents already in place. In case files are created and then written to in the final location, use AbstractDelayedFsEventPoller instead with a suitable delay.
FsEventPoller::AbstractFsEventPoller::constructor | ( | string | path, |
hash< AbstractFsEventPollerOptionInfo > | options = < AbstractFsEventPollerOptionInfo >{} |
||
) |
Construct a file poller.
path | a string with full path to the directory to be monitored |
options | a hash with options; see AbstractFsEventPollerOptionInfo for details about this parameter |
|
pure virtual |
Abstract method called whenever soem filesystem event occurs.
event | file event info |
|
private |
Set filesystem mask like in shell etc.
Converts a glob (standard filesystem) mask into a regex. Example: *.*, *.txt, someprefix_*.csv
mask | a string with file name mask |