45#ifndef Foam_fileMonitor_H
46#define Foam_fileMonitor_H
60template<
class EnumType>
class Enum;
87 const bool useInotify_;
102 mutable std::unique_ptr<fileMonitorWatcher> watcher_;
108 void checkFiles()
const;
150 const bool masterOnly,
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Internal tracking via stat(3p) or inotify(7).
Checking for changes to files.
fileState getState(const label watchFd) const
Check state using handle.
label addWatch(const fileName &)
Add file to watch. Return watch descriptor.
void setUnmodified(const label watchFd)
Reset state (e.g. after having read it) using handle.
~fileMonitor()
Destructor.
const fileName & getFile(const label watchFd) const
Get name of file being watched.
void updateStates(const bool masterOnly, const bool syncPar) const
Check state of all files. Updates state_.
static int debug
Named/registered debug switch: 'fileMonitor'.
static const Enum< fileState > fileStateNames_
fileState
Enumeration defining the file state.
bool removeWatch(const label watchFd)
Remove file to watch. Return true if successful.
A class for handling file names.
Namespace for handling debugging switches.