174 const RequiredKeys = ...;
185 int poll_interval = 10;
188 bool runflag = False;
197 int sort_type = SortName;
200 int sort_order = OrderAsc;
388 static checkPath(
string path,
string type,
bool write = False);
482 hash<DataProviderInfo> getStaticInfoImpl();
518 hash<DataProviderInfo> getStaticInfoImpl();
545 static Class
cls =
new Class(
"FileDelayedPollerDataProvider");
584 Observable observable;
588 constructor(FilePollerDataProviderBase provider,
string path,
string mask, *hash<auto> options) ;
591 singleFileEvent(hash<auto> event);
595const FileWhiteLogo = ...;
598const FileBlackLogo = ...;
Event-based data provider for file polling events.
Definition FilePoller.qm.dox.h:494
constructor(*hash< auto > options)
Creates the object from constructor options.
observersReady()
Called when all observers have been added to the object.
stopEvents()
Called to stop generating events.
const ProviderInfo
Provider info.
Definition FilePoller.qm.dox.h:498
Event-based data provider for file events.
Definition FilePoller.qm.dox.h:418
*string getDesc()
Returns the data provider description.
EmbeddedFilePoller poller
The file poller itself.
Definition FilePoller.qm.dox.h:427
hash< string, hash< DataProviderMessageInfo > > getEventTypesImpl()
Returns a hash of all supported event types.
constructor(*hash< auto > options)
Creates the object from constructor options.
const ConstructorOptions
Constructor options.
Definition FilePoller.qm.dox.h:422
updateConnectionObjects(object conn, object connobj)
Update any connection used by the data provider.
The file poller data provider factory.
Definition FilePoller.qm.dox.h:540
const FactoryInfo
Factory info.
Definition FilePoller.qm.dox.h:548
hash< DataProviderFactoryInfo > getInfoImpl()
Returns static factory information without provider_info.
Class getClassImpl()
Returns the class for the data provider object.
static Class cls
Data provider type info.
Definition FilePoller.qm.dox.h:545
hash< DataProviderInfo > getProviderInfoImpl()
Returns static provider information.
Event-based data provider for file polling events.
Definition FilePoller.qm.dox.h:470
constructor(*hash< auto > options)
Creates the object from constructor options.
const ProviderInfo
Provider info.
Definition FilePoller.qm.dox.h:474
File poller event data description.
Definition FilePoller.qm.dox.h:524
const Fields
Markdown descriptions for hashdecl members.
Definition FilePoller.qm.dox.h:528
constructor()
Creates the type.
*softint minage
minimum file age in seconds before the file will be included in the list returned
Definition FilePoller.qm.dox.h:215
*code log_info
optional info log closure
Definition FilePoller.qm.dox.h:218
logDebug(string fmt,...)
calls "log_debug" with verbose debugging information; if set
int reopt
regex options
Definition FilePoller.qm.dox.h:212
int start()
starts polling in the background; returns the thread ID of the polling thread
const SortNone
no sorting
Definition FilePoller.qm.dox.h:163
string path
path to monitor
Definition FilePoller.qm.dox.h:179
constructor(string n_path, string n_mask, *hash< auto > n_opts)
creates the object
*code log_debug
optional debug log closure
Definition FilePoller.qm.dox.h:224
int tid
polling tid
Definition FilePoller.qm.dox.h:206
destructor()
stops the polling operation if in progress and destroys the object
*code log_detail
optional detail log closure
Definition FilePoller.qm.dox.h:221
list< hash< FilePollerFileEventInfo > > 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
const OrderAsc
ascending sort order
Definition FilePoller.qm.dox.h:158
int getPollCount()
returns the current poll count
setPath(string path)
Changes the polling path.
waitStop()
Waits indefinitely for the polling operation to stop.
abstract singleFileEvent(hash< FilePollerFileEventInfo > event)
called for each matching file individually when matching files are polled
Qore::Thread::Counter sc()
stop counter
string mask
file name mask
Definition FilePoller.qm.dox.h:182
run()
starts the polling operation
startInline()
starts the polling operation inline (not in a background thread)
stop()
stops the polling operation, returns when the polling operation has been stopped
bool runOnce()
runs a single poll (useful for checking for errors inline before starting a background thread)
*code sleep
optional sleep closure
Definition FilePoller.qm.dox.h:230
logDetail(string fmt,...)
calls "log_detail" with detail information; if set
stopNoWait()
stops the polling operation, returns immediately
Qore::Thread::Mutex m()
start mutex
static checkPath(string path, string type, bool write=False)
checks a path on the server file system
*code start_thread
optional start thread closure
Definition FilePoller.qm.dox.h:227
fileEvent(list< hash< FilePollerFileEventInfo > > files)
Called for each poll event with a list of all files matched.
fileSleep(softint secs)
sleeps for the specificed number of seconds
logInfo(string fmt,...)
calls "log_info" with important information, if set
Main module namespace.
Definition FilePoller.qm.dox.h:72
const AppName
Generic app name for the server filesystem.
Definition FilePoller.qm.dox.h:74
const EVENT_FILE
File event constant.
Definition FilePoller.qm.dox.h:77
FilePoller file event hash.
Definition FilePoller.qm.dox.h:80
date ctime
The created date/time of the file.
Definition FilePoller.qm.dox.h:114
int nlink
The number of hard links to this file.
Definition FilePoller.qm.dox.h:93
int mode
The file protection mode.
Definition FilePoller.qm.dox.h:90
int inode
The inode of the file.
Definition FilePoller.qm.dox.h:85
string type
the type of file
Definition FilePoller.qm.dox.h:138
string name
The name of the file, link, or directory.
Definition FilePoller.qm.dox.h:144
int dev
The device inode number the file is on.
Definition FilePoller.qm.dox.h:82
int blocks
Blocks allocated for the file.
Definition FilePoller.qm.dox.h:124
int uid
The UID of the owner of the file.
Definition FilePoller.qm.dox.h:96
int blksize
Block size.
Definition FilePoller.qm.dox.h:119
date atime
The last accessed date/time of the file.
Definition FilePoller.qm.dox.h:108
int rdev
The device type number.
Definition FilePoller.qm.dox.h:102
string perm
a string giving UNIX-style permissions for the file (ex: "-rwxr-xr-x")
Definition FilePoller.qm.dox.h:141
int gid
The GID of the owner of the file.
Definition FilePoller.qm.dox.h:99
int size
The size of the file in bytes.
Definition FilePoller.qm.dox.h:105
*string link
symbolic link target (if present)
Definition FilePoller.qm.dox.h:150
string filepath
The entire path of the file.
Definition FilePoller.qm.dox.h:147
date mtime
The last modified date/time of the file.
Definition FilePoller.qm.dox.h:111