Internal tracking via stat(3p) or inotify(7) More...
Public Member Functions | |
fileMonitorWatcher (const bool useInotify, const label sz=20) | |
Initialise inotify. More... | |
~fileMonitorWatcher () | |
Remove all watches. More... | |
bool | addWatch (const label watchFd, const fileName &fName) |
bool | removeWatch (const label watchFd) |
Public Attributes | |
const bool | useInotify_ |
int | inotifyFd_ |
File descriptor for the inotify instance. More... | |
DynamicList< label > | dirWatches_ |
Current watchIDs and corresponding directory id. More... | |
DynamicList< fileName > | dirFiles_ |
DynamicList< double > | lastMod_ |
From watch descriptor to modified time. More... | |
Internal tracking via stat(3p) or inotify(7)
Definition at line 111 of file fileMonitor.C.
|
inline |
Initialise inotify.
Definition at line 134 of file fileMonitor.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, DynamicList< T, SizeInc, SizeMult, SizeDiv >::setCapacity(), and WarningInFunction.
|
inline |
Remove all watches.
Definition at line 183 of file fileMonitor.C.
References Foam::endl(), forAll, and WarningInFunction.
Definition at line 204 of file fileMonitor.C.
References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::highResLastModified(), Foam::isDir(), fileName::name(), fileName::path(), and List< T >::size().
|
inline |
Definition at line 270 of file fileMonitor.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, regIOobject::fileModificationSkew, forAll, Foam::highResLastModified(), oldTime(), and Foam::read().
const bool useInotify_ |
Definition at line 115 of file fileMonitor.C.
int inotifyFd_ |
File descriptor for the inotify instance.
Definition at line 120 of file fileMonitor.C.
DynamicList<label> dirWatches_ |
Current watchIDs and corresponding directory id.
Definition at line 123 of file fileMonitor.C.
DynamicList<fileName> dirFiles_ |
Definition at line 124 of file fileMonitor.C.
DynamicList<double> lastMod_ |
From watch descriptor to modified time.
Definition at line 129 of file fileMonitor.C.