45 #ifndef Foam_fileMonitor_H 46 #define Foam_fileMonitor_H 50 #include <sys/types.h> 59 class fileMonitorWatcher;
60 template<
class EnumType>
class Enum;
87 const bool useInotify_;
102 mutable std::unique_ptr<fileMonitorWatcher> watcher_;
108 void checkFiles()
const;
150 const bool masterOnly,
static const Enum< fileState > fileStateNames_
A class for handling file names.
Checking for changes to files.
static int debug
Named/registered debug switch: 'fileMonitor'.
fileState getState(const label watchFd) const
Check state using handle.
fileState
Enumeration defining the file state.
void setUnmodified(const label watchFd)
Reset state (e.g. after having read it) using handle.
bool removeWatch(const label watchFd)
Remove file to watch. Return true if successful.
void updateStates(const bool masterOnly, const bool syncPar) const
Check state of all files. Updates state_.
const fileName & getFile(const label watchFd) const
Get name of file being watched.
~fileMonitor()
Destructor.
label addWatch(const fileName &)
Add file to watch. Return watch descriptor.