52 namespace FilePoller {
194 list getFiles(
int sort = FilePoller::SortNone,
int order = FilePoller::OrderAsc);
const Options
known constructor() options
Definition: FilePoller.qm.dox.h:72
const RequiredKeys
minimum required keys for all constructors
Definition: FilePoller.qm.dox.h:85
int poll_interval
poll interval in seconds
Definition: FilePoller.qm.dox.h:100
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
run()
starts the polling operation
fileSleep(softint secs)
sleeps for the specificed number of seconds
*code sleep
optional sleep closure
Definition: FilePoller.qm.dox.h:145
stop()
stops the polling operation, returns when the polling operation has been stopped
bool fatal
internal fatal error flag
Definition: FilePoller.qm.dox.h:106
string mask
file name mask
Definition: FilePoller.qm.dox.h:97
*code log_info
optional info log closure
Definition: FilePoller.qm.dox.h:133
const SortName
sort by name
Definition: FilePoller.qm.dox.h:67
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:109
Qore::Thread::Mutex m()
start mutex
int sort_type
file sort type
Definition: FilePoller.qm.dox.h:112
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:115
logDebug(string fmt)
calls the "log_debug" closure or call reference with verbose debugging information ...
abstract singleFileEvent(hash fih)
called for each matching file individually whenever matching files are polled with the list of matchi...
waitStop()
waits indefinitely for the polling operation to stop; if polling was not in progress then this method...
const SortNone
no sorting
Definition: FilePoller.qm.dox.h:65
int tid
polling tid
Definition: FilePoller.qm.dox.h:121
logInfo(string fmt)
calls the "log_info" closure or call reference with important information
file polling class
Definition: FilePoller.qm.dox.h:55
bool runflag
run flag
Definition: FilePoller.qm.dox.h:103
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:130
const SortDate
sort by date
Definition: FilePoller.qm.dox.h:69
const OrderAsc
ascending sort order
Definition: FilePoller.qm.dox.h:60
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:136
*code log_debug
optional debug log closure
Definition: FilePoller.qm.dox.h:139
Qore::Thread::Counter sc()
stop counter
constructor(string n_path, string n_mask, *hash n_opts)
creates the object
logDetail(string fmt)
calls the "log_detail" closure or call reference with detail information
const OrderDesc
descending sort order
Definition: FilePoller.qm.dox.h:62
*code start_thread
optional start thread closure
Definition: FilePoller.qm.dox.h:142
string path
path to monitor
Definition: FilePoller.qm.dox.h:94
int reopt
regex options
Definition: FilePoller.qm.dox.h:127
bool runOnce()
runs a single poll (useful for checking for errors inline before starting a background thread) ...