Go to the documentation of this file.
45 #include <sys/types.h>
56 class fileMonitorWatcher;
145 const bool masterOnly,
DynamicList< fileState > localState_
State for all watchFds based on local files.
fileMonitor(const fileMonitor &)
Disallow default bitwise copy construct.
A class for handling file names.
const fileName & getFile(const label watchFd) const
Get name of file being watched.
bool removeWatch(const label watchFd)
Remove file to watch. Return true if successful.
DynamicList< fileState > state_
State for all watchFds - synchronised.
label addWatch(const fileName &)
Add file to watch. Return watch descriptor.
fileState
Enumeration defining the file state.
void operator=(const fileMonitor &)
Disallow default bitwise assignment.
~fileMonitor()
Destructor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
autoPtr< fileMonitorWatcher > watcher_
Watch mechanism (stat or inotify)
Macro definitions for declaring ClassName(), NamespaceName(), etc.
DynamicList< label > freeWatchFds_
Free watchFds.
Checking for changes to files.
static const NamedEnum< fileState, 3 > fileStateNames_
const bool useInotify_
Whether to use inotify (requires -DFOAM_USE_INOTIFY, see above)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
fileState getState(const label watchFd) const
Check state using handle.
void setUnmodified(const label watchFd)
Reset state (e.g. after having read it) using handle.
DynamicList< fileName > watchFile_
Filename for all watchFds.
void updateStates(const bool masterOnly, const bool syncPar) const
Check state of all files. Updates state_.
void checkFiles() const
Update localState_ from any events.