52 namespace FilePoller {
189 list getFiles(
int sort = FilePoller::SortNone,
int order = FilePoller::OrderAsc);
private logDebug(string fmt)
calls the "log_debug" closure or call reference with verbose debugging information ...
private run()
starts the polling operation
const Options
known constructor() options
Definition: FilePoller.qm.dox.h:67
const RequiredKeys
minimum required keys for all constructors
Definition: FilePoller.qm.dox.h:80
int poll_interval
poll interval in seconds
Definition: FilePoller.qm.dox.h:95
fileEvent(list files)
called for each poll event with a list of all files matched; calls singleFileEvent() on each file has...
destructor()
stops the polling operation if in progress and destroys the object
*code sleep
optional sleep closure
Definition: FilePoller.qm.dox.h:140
stop()
stops the polling operation, returns when the polling operation has been stopped
bool fatal
internal fatal error flag
Definition: FilePoller.qm.dox.h:101
string mask
file name mask
Definition: FilePoller.qm.dox.h:92
*code log_info
optional info log closure
Definition: FilePoller.qm.dox.h:128
private logDetail(string fmt)
calls the "log_detail" closure or call reference with detail information
list getFiles(int sort=FilePoller::SortNone, int order=FilePoller::OrderAsc)
returns a list of regular file hashes matching any file name mask set for the object ...
startInline()
starts the polling operation inline (not in a background thread)
int pollcnt
internal poll counter
Definition: FilePoller.qm.dox.h:104
private fileSleep(softint secs)
sleeps for the specificed number of seconds
int sort_type
file sort type
Definition: FilePoller.qm.dox.h:107
stopNoWait()
stops the polling operation, returns immediately
int getPollCount()
returns the current poll count
int sort_order
file sort order
Definition: FilePoller.qm.dox.h:110
abstract singleFileEvent(hash fih)
called for each matching file individually whenever matching files are polled with the list of matchi...
private logInfo(string fmt)
calls the "log_info" closure or call reference with important information
waitStop()
waits indefinitely for the polling operation to stop; if polling was not in progress then this method...
int tid
polling tid
Definition: FilePoller.qm.dox.h:116
file polling class
Definition: FilePoller.qm.dox.h:55
bool runflag
run flag
Definition: FilePoller.qm.dox.h:98
int start()
starts polling in the background; returns the thread ID of the polling thread
*softint minage
minimum file age in seconds before the file will be included in the list returned ...
Definition: FilePoller.qm.dox.h:125
static checkPath(string path, string type, bool write=False)
checks a path on the local file system
*code log_detail
optional detail log closure
Definition: FilePoller.qm.dox.h:131
*code log_debug
optional debug log closure
Definition: FilePoller.qm.dox.h:134
constructor(string n_path, string n_mask, *hash n_opts)
creates the object
*code start_thread
optional start thread closure
Definition: FilePoller.qm.dox.h:137
string path
path to monitor
Definition: FilePoller.qm.dox.h:89
int reopt
regex options
Definition: FilePoller.qm.dox.h:122
bool runOnce()
runs a single poll (useful for checking for errors inline before starting a background thread) ...