/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class fileMonitor Description Checking for changes to files. Note The default is to use inotify (Linux specific, since 2.6.13) Compiling with FOAM_USE_STAT (or if /usr/include/sys/inotify.h does not exist) uses the stat function call. SourceFiles fileMonitor.C \*---------------------------------------------------------------------------*/ #ifndef fileMonitor_H #define fileMonitor_H #include #include "NamedEnum.H" #include "className.H" #include "DynamicList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { class fileMonitor; class fileMonitorWatcher; /*---------------------------------------------------------------------------*\ Class fileMonitor Declaration \*---------------------------------------------------------------------------*/ class fileMonitor { public: // Public data types //- Enumeration defining the file state. enum fileState { UNMODIFIED = 0, MODIFIED = 1, DELETED = 2, }; static const NamedEnum fileStateNames_; private: // Private data //- State for all watchFds mutable DynamicList state_; //- Filename for all watchFds DynamicList watchFile_; //- Free watchFds DynamicList