fileOperations that performs all file operations on the master processor. Requires the calls to be parallel synchronised! More...
Classes | |
class | chModOp |
class | cpOp |
class | existsOp |
class | fileOrNullOp |
class | fileSizeOp |
class | isDirOp |
class | isFileOp |
class | lastModifiedHROp |
class | lastModifiedOp |
class | lnOp |
class | mkDirOp |
class | modeOp |
class | mvBakOp |
class | mvOp |
class | readDirOp |
class | rmDirOp |
class | rmOp |
class | typeOp |
Public Member Functions | |
TypeName ("masterUncollated") | |
Runtime type information. More... | |
masterUncollatedFileOperation (const bool verbose) | |
Construct null. More... | |
virtual | ~masterUncollatedFileOperation () |
Destructor. More... | |
virtual bool | mkDir (const fileName &, mode_t=0777) const |
Make directory. More... | |
virtual bool | chMod (const fileName &, const mode_t) const |
Set the file mode. More... | |
virtual mode_t | mode (const fileName &, const bool followLink=true) const |
Return the file mode. More... | |
virtual fileName::Type | type (const fileName &, const bool followLink=true) const |
Return the file type: DIRECTORY, FILE or LINK. More... | |
virtual bool | exists (const fileName &, const bool checkGzip=true, const bool followLink=true) const |
Does the name exist (as DIRECTORY or FILE) in the file system? More... | |
virtual bool | isDir (const fileName &, const bool followLink=true) const |
Does the name exist as a DIRECTORY in the file system? More... | |
virtual bool | isFile (const fileName &, const bool checkGzip=true, const bool followLink=true) const |
Does the name exist as a FILE in the file system? More... | |
virtual off_t | fileSize (const fileName &, const bool followLink=true) const |
Return size of file. More... | |
virtual time_t | lastModified (const fileName &, const bool followLink=true) const |
Return time of last file modification. More... | |
virtual double | highResLastModified (const fileName &, const bool followLink=true) const |
Return time of last file modification. More... | |
virtual fileNameList | readDir (const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true) const |
Read a directory and return the entries as a string list. More... | |
virtual bool | cp (const fileName &src, const fileName &dst, const bool followLink=true) const |
Copy, recursively if necessary, the source to the destination. More... | |
virtual bool | ln (const fileName &src, const fileName &dst) const |
Create a softlink. dst should not exist. Returns true if. More... | |
virtual bool | mv (const fileName &src, const fileName &dst, const bool followLink=false) const |
Rename src to dst. More... | |
virtual bool | mvBak (const fileName &, const std::string &ext="bak") const |
Rename to a corresponding backup file. More... | |
virtual bool | rm (const fileName &) const |
Remove a file, returning true if successful otherwise false. More... | |
virtual bool | rmDir (const fileName &) const |
Remove a dirctory and its contents. More... | |
virtual fileName | filePath (const bool checkGlobal, const IOobject &, const word &typeName) const |
Search for an object. checkGlobal : also check undecomposed case. More... | |
virtual fileName | dirPath (const bool checkGlobal, const IOobject &) const |
Search for a directory. checkGlobal : also check undecomposed. More... | |
virtual fileNameList | readObjects (const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const |
Search directory for objects. Used in IOobjectList. More... | |
virtual bool | readHeader (IOobject &, const fileName &, const word &typeName) const |
Read object header from supplied file. More... | |
virtual autoPtr< ISstream > | readStream (regIOobject &, const fileName &, const word &typeName, const bool valid=true) const |
Reads header for regIOobject and returns an ISstream. More... | |
virtual bool | read (regIOobject &, const bool masterOnly, const IOstream::streamFormat format, const word &typeName) const |
Top-level read. More... | |
virtual bool | writeObject (const regIOobject &, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, const bool valid=true) const |
Writes a regIOobject (so header, contents and divider). More... | |
virtual autoPtr< ISstream > | NewIFstream (const fileName &) const |
Generate an ISstream that reads a file. More... | |
virtual autoPtr< Ostream > | NewOFstream (const fileName &pathname, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, const bool valid=true) const |
Generate an Ostream that writes a file. More... | |
virtual label | addWatch (const fileName &) const |
Add watching of a file. Returns handle. More... | |
virtual bool | removeWatch (const label) const |
Remove watch on a file (using handle) More... | |
virtual label | findWatch (const labelList &watchIndices, const fileName &) const |
Find index (or -1) of file in list of handles. More... | |
virtual void | addWatches (regIOobject &, const fileNameList &) const |
Helper: add watches for list of regIOobjects. More... | |
virtual fileName | getFile (const label) const |
Get name of file being watched (using handle) More... | |
virtual void | updateStates (const bool masterOnly, const bool syncPar) const |
Update state of all files. More... | |
virtual fileMonitor::fileState | getState (const label) const |
Get current state of file (using handle) More... | |
virtual void | setUnmodified (const label) const |
Set current state of file (using handle) to unmodified. More... | |
virtual instantList | findTimes (const fileName &, const word &) const |
Get sorted list of times. More... | |
virtual void | setTime (const Time &) const |
Callback for time change. More... | |
const HashPtrTable< instantList > & | times () const |
Return cached times. More... | |
Public Member Functions inherited from fileOperation | |
TypeName ("fileOperation") | |
Runtime type information. More... | |
fileOperation () | |
Construct null. More... | |
declareRunTimeSelectionTable (autoPtr, fileOperation, word,(const bool verbose),(verbose)) | |
virtual | ~fileOperation () |
Destructor. More... | |
virtual fileName | objectPath (const IOobject &io, const word &typeName) const |
Generate disk file name for object. Opposite of filePath. More... | |
virtual fileName | filePath (const fileName &) const |
Search for a file or directory. Use IOobject version in. More... | |
virtual label | nProcs (const fileName &dir, const fileName &local="") const |
Get number of processor directories/results. Used for e.g. More... | |
Static Public Member Functions | |
static bool | uniformFile (const fileNameList &) |
Same file? More... | |
static fileName | processorsCasePath (const IOobject &) |
root+casename with any 'processorXXX' replaced by 'processsors' More... | |
static fileName | processorsPath (const IOobject &, const word &) |
Like io.path with provided instance and any 'processorXXX'. More... | |
static fileName | processorsPath (const fileName &) |
Operating on fileName: replace processorXXX with processors. More... | |
static label | splitProcessorPath (const fileName &, fileName &path, fileName &local) |
Split fileName into part before processor and part after. More... | |
Static Public Member Functions inherited from fileOperation | |
static autoPtr< fileOperation > | New (const word &type, const bool verbose) |
Select type. More... | |
Static Public Attributes | |
static float | maxMasterFileBufferSize |
Max size of parallel communications. Switches from non-blocking. More... | |
Static Public Attributes inherited from fileOperation | |
static word | processorsDir = "processors" |
Return the processors directory name (usually "processors") More... | |
static word | defaultFileHandler |
Default fileHandler. More... | |
static autoPtr< fileOperation > | fileHandlerPtr_ |
Static fileOperation. More... | |
Protected Member Functions | |
template<class Type > | |
Type | scatterList (const UList< Type > &) const |
template<class Type , class fileOp > | |
Type | masterOp (const fileName &, const fileOp &fop) const |
template<class Type , class fileOp > | |
Type | masterOp (const fileName &, const fileName &, const fileOp &fop) const |
fileName | filePathInfo (const bool checkGlobal, const bool isFile, const IOobject &, pathType &, word &) const |
Search for object; return info on how it was found. More... | |
Protected Member Functions inherited from fileOperation | |
fileMonitor & | monitor () const |
Static Protected Member Functions | |
static word | findInstancePath (const instantList &timeDirs, const instant &t) |
Equivalent of Time::findInstance. More... | |
static fileName | objectPath (const IOobject &, const pathType &, const word &) |
Construct filePath. More... | |
static void | readAndSend (const fileName &filePath, const IOstream::compressionType cmp, const labelUList &procs, PstreamBuffers &pBufs) |
Read file contents and send to processors. More... | |
Static Protected Member Functions inherited from fileOperation | |
static instantList | sortTimes (const fileNameList &, const word &) |
Sort directory entries according to time value. More... | |
static bool | isFileOrDir (const bool isFile, const fileName &) |
Helper: check for file (isFile) or directory (!isFile) More... | |
Protected Attributes | |
HashPtrTable< instantList > | times_ |
Cached times for a given directory. More... | |
Protected Attributes inherited from fileOperation | |
autoPtr< fileMonitor > | monitorPtr_ |
file-change monitor for all registered files More... | |
Additional Inherited Members | |
Public Types inherited from fileOperation | |
enum | pathType { NOTFOUND, ABSOLUTE, OBJECT, PROCESSORSOBJECT, PARENTOBJECT, FINDINSTANCE, PROCESSORSFINDINSTANCE } |
Enumeration for the location of an IOobject. More... | |
fileOperations that performs all file operations on the master processor. Requires the calls to be parallel synchronised!
Definition at line 53 of file masterUncollatedFileOperation.H.
masterUncollatedFileOperation | ( | const bool | verbose | ) |
Construct null.
Definition at line 455 of file masterUncollatedFileOperation.C.
References Foam::endl(), IOobject::fileModificationChecking, Foam::Info, IOobject::inotify, IOobject::inotifyMaster, IOobject::timeStamp, IOobject::timeStampMaster, WarningInFunction, and masterUncollatedFileOperation::~masterUncollatedFileOperation().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::readAndSend().
|
virtual |
Destructor.
Definition at line 495 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::mkDir().
Referenced by masterUncollatedFileOperation::masterUncollatedFileOperation(), and masterUncollatedFileOperation::readDirOp::operator()().
|
protected |
Definition at line 33 of file masterUncollatedFileOperationTemplates.C.
References PstreamBuffers::finishedSends(), and masterUncollatedFileOperation::masterOp().
Referenced by masterUncollatedFileOperation::readDirOp::operator()().
|
protected |
Definition at line 66 of file masterUncollatedFileOperationTemplates.C.
References Foam::endl(), Foam::Pout, and List< T >::size().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::scatterList().
Definition at line 105 of file masterUncollatedFileOperationTemplates.C.
References Foam::endl(), Foam::Pout, and List< T >::size().
|
staticprotected |
Equivalent of Time::findInstance.
Definition at line 70 of file masterUncollatedFileOperation.C.
References instant::equal(), masterUncollatedFileOperation::filePathInfo(), forAllReverse, and word::null.
Referenced by masterUncollatedFileOperation::readDirOp::operator()().
|
protected |
Search for object; return info on how it was found.
checkGlobal : also check undecomposed case isFile : true:check for file false:check for directory
Definition at line 94 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, IOobject::caseName(), TimePaths::constant(), IOobject::db(), objectRegistry::dbDir(), fileOperation::FINDINSTANCE, TimePaths::globalCaseName(), IOobject::instance(), fileName::isAbsolute(), IOobject::local(), IOobject::name(), fileOperation::NOTFOUND, word::null, fileName::null, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, Time::path(), TimePaths::processorCase(), masterUncollatedFileOperation::processorsCasePath(), fileOperation::PROCESSORSFINDINSTANCE, fileOperation::PROCESSORSOBJECT, IOobject::rootPath(), TimePaths::system(), and IOobject::time().
Referenced by masterUncollatedFileOperation::findInstancePath(), and masterUncollatedFileOperation::readDirOp::operator()().
|
staticprotected |
Construct filePath.
Definition at line 317 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, IOobject::caseName(), IOobject::db(), objectRegistry::dbDir(), fileOperation::FINDINSTANCE, TimePaths::globalCaseName(), IOobject::instance(), IOobject::local(), IOobject::name(), fileOperation::NOTFOUND, NotImplemented, fileName::null, fileOperation::OBJECT, fileOperation::PARENTOBJECT, IOobject::path(), fileOperation::PROCESSORSFINDINSTANCE, fileOperation::PROCESSORSOBJECT, IOobject::rootPath(), IOobject::time(), and masterUncollatedFileOperation::uniformFile().
Referenced by collatedFileOperation::objectPath(), masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::splitProcessorPath().
|
staticprotected |
Read file contents and send to processors.
Definition at line 401 of file masterUncollatedFileOperation.C.
References UList< T >::begin(), Foam::endl(), Foam::fileSize(), forAll, masterUncollatedFileOperation::masterUncollatedFileOperation(), Foam::Pout, IFstream::stdStream(), and UOPstream::write().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::uniformFile().
TypeName | ( | "masterUncollated" | ) |
Runtime type information.
Referenced by masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Make directory.
Implements fileOperation.
Definition at line 502 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::chMod().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::~masterUncollatedFileOperation().
|
virtual |
Set the file mode.
Implements fileOperation.
Definition at line 512 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::mode().
Referenced by masterUncollatedFileOperation::mkDir(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Return the file mode.
Implements fileOperation.
Definition at line 522 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::type().
Referenced by masterUncollatedFileOperation::chMod(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Return the file type: DIRECTORY, FILE or LINK.
Implements fileOperation.
Definition at line 532 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::exists().
Referenced by masterUncollatedFileOperation::mode(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Does the name exist (as DIRECTORY or FILE) in the file system?
Optionally enable/disable check for gzip file.
Implements fileOperation.
Definition at line 542 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::isDir().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::type().
|
virtual |
Does the name exist as a DIRECTORY in the file system?
Implements fileOperation.
Definition at line 553 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::isFile().
Referenced by masterUncollatedFileOperation::exists(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Does the name exist as a FILE in the file system?
Optionally enable/disable check for gzip file.
Implements fileOperation.
Definition at line 563 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::fileSize().
Referenced by masterUncollatedFileOperation::isDir(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Return size of file.
Implements fileOperation.
Definition at line 574 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::lastModified().
Referenced by masterUncollatedFileOperation::isFile(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Return time of last file modification.
Implements fileOperation.
Definition at line 584 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::highResLastModified().
Referenced by masterUncollatedFileOperation::fileSize(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Return time of last file modification.
Implements fileOperation.
Definition at line 598 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::mvBak().
Referenced by masterUncollatedFileOperation::lastModified(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Read a directory and return the entries as a string list.
Implements fileOperation.
Definition at line 640 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::cp().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::rmDir().
Copy, recursively if necessary, the source to the destination.
Implements fileOperation.
Definition at line 656 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::ln().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::readDir().
Create a softlink. dst should not exist. Returns true if.
successful.
Implements fileOperation.
Definition at line 667 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::mv().
Referenced by masterUncollatedFileOperation::cp(), and masterUncollatedFileOperation::readDirOp::operator()().
Rename src to dst.
Implements fileOperation.
Definition at line 677 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::filePath().
Referenced by masterUncollatedFileOperation::ln(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Rename to a corresponding backup file.
If the backup file already exists, attempt with "01" .. "99" suffix
Implements fileOperation.
Definition at line 612 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::rm().
Referenced by masterUncollatedFileOperation::highResLastModified(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Remove a file, returning true if successful otherwise false.
Implements fileOperation.
Definition at line 622 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::rmDir().
Referenced by masterUncollatedFileOperation::mvBak(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Remove a dirctory and its contents.
Implements fileOperation.
Definition at line 631 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::readDir().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::rm().
|
virtual |
Search for an object. checkGlobal : also check undecomposed case.
Implements fileOperation.
Definition at line 688 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, TimePaths::constant(), masterUncollatedFileOperation::dirPath(), Foam::endl(), fileOperation::FINDINSTANCE, UPstream::master(), fileOperation::NOTFOUND, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, Time::path(), Foam::Pout, fileOperation::PROCESSORSFINDINSTANCE, fileOperation::PROCESSORSOBJECT, Pstream::scatter(), and IOobject::time().
Referenced by masterUncollatedFileOperation::mv(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Search for a directory. checkGlobal : also check undecomposed.
case
Implements fileOperation.
Definition at line 772 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, Foam::endl(), fileOperation::FINDINSTANCE, UPstream::master(), fileOperation::NOTFOUND, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, Foam::Pout, fileOperation::PROCESSORSFINDINSTANCE, fileOperation::PROCESSORSOBJECT, masterUncollatedFileOperation::readObjects(), and Pstream::scatter().
Referenced by masterUncollatedFileOperation::filePath(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Search directory for objects. Used in IOobjectList.
Use non-time searching version
Reimplemented from fileOperation.
Definition at line 852 of file masterUncollatedFileOperation.C.
References TimePaths::constant(), Foam::endl(), instant::equal(), fileOperation::findTimes(), forAllReverse, UPstream::master(), Foam::name(), word::null, IOobject::objectPath(), Time::path(), Foam::Pout, masterUncollatedFileOperation::readHeader(), fileOperation::readObjects(), Pstream::scatter(), objectRegistry::time(), and timeDirs.
Referenced by masterUncollatedFileOperation::dirPath(), and masterUncollatedFileOperation::readDirOp::operator()().
Read object header from supplied file.
Implements fileOperation.
Definition at line 929 of file masterUncollatedFileOperation.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Pstream::gatherList(), IOstream::good(), IOobject::headerClassName(), UPstream::master(), UPstream::myProcNo(), IOobject::note(), UPstream::nProcs(), IOobject::objectPath(), Foam::Pout, IOobject::readHeader(), decomposedBlockData::readMasterHeader(), masterUncollatedFileOperation::readStream(), and Pstream::scatter().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::readObjects().
|
virtual |
Reads header for regIOobject and returns an ISstream.
to read the contents.
Implements fileOperation.
Definition at line 1028 of file masterUncollatedFileOperation.C.
References autoPtr< T >::clear(), Foam::endl(), Foam::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::FatalIOError, FatalIOErrorInFunction, Foam::fileSize(), PstreamBuffers::finishedSends(), Pstream::gatherList(), IOobject::headerClassName(), UPstream::master(), UPstream::masterNo(), UPstream::myProcNo(), IOobject::name(), UPstream::nonBlocking, UPstream::nProcs(), IOobject::objectPath(), UPstream::parRun(), path(), Foam::Pout, autoPtr< T >::ptr(), UIPstream::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlock(), decomposedBlockData::readBlocks(), IOobject::readHeader(), autoPtr< T >::reset(), Pstream::scatter(), UPstream::scheduled, masterUncollatedFileOperation::splitProcessorPath(), autoPtr< T >::valid(), and UPstream::worldComm.
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::readHeader().
|
virtual |
Top-level read.
Implements fileOperation.
Definition at line 1273 of file masterUncollatedFileOperation.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), regIOobject::close(), Foam::endl(), forAll, format(), IOobject::globalObject(), IOobject::headerClassName(), UPstream::linearCommunication(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), IOobject::note(), UPstream::nProcs(), UPstream::nProcsSimpleSum, UPstream::parRun(), Foam::Pout, regIOobject::readData(), Pstream::scatter(), UPstream::scheduled, UPstream::treeCommunication(), UPstream::worldComm, regIOobject::writeData(), and masterUncollatedFileOperation::writeObject().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::readStream().
|
virtual |
Writes a regIOobject (so header, contents and divider).
Returns success state.
Reimplemented from fileOperation.
Reimplemented in collatedFileOperation.
Definition at line 1367 of file masterUncollatedFileOperation.C.
References Foam::endl(), masterUncollatedFileOperation::findTimes(), IOstream::good(), IOobject::objectPath(), Foam::Pout, setTime(), IOobject::time(), regIOobject::writeData(), IOobject::writeEndDivider(), and IOobject::writeHeader().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::read().
|
virtual |
Generate an ISstream that reads a file.
Implements fileOperation.
Definition at line 1519 of file masterUncollatedFileOperation.C.
References Foam::endl(), Foam::exists(), PstreamBuffers::finishedSends(), Pstream::gatherList(), UPstream::master(), UPstream::masterNo(), UPstream::myProcNo(), masterUncollatedFileOperation::NewOFstream(), UPstream::nonBlocking, UPstream::nProcs(), UPstream::parRun(), Foam::Pout, and UIPstream::read().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::setTime().
|
virtual |
Generate an Ostream that writes a file.
Implements fileOperation.
Definition at line 1630 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::addWatch().
Referenced by masterUncollatedFileOperation::NewIFstream(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Add watching of a file. Returns handle.
Reimplemented from fileOperation.
Definition at line 1654 of file masterUncollatedFileOperation.C.
References UPstream::master(), masterUncollatedFileOperation::removeWatch(), and Pstream::scatter().
Referenced by masterUncollatedFileOperation::NewOFstream(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Remove watch on a file (using handle)
Reimplemented from fileOperation.
Definition at line 1669 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::findWatch(), UPstream::master(), and Pstream::scatter().
Referenced by masterUncollatedFileOperation::addWatch(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Find index (or -1) of file in list of handles.
Reimplemented from fileOperation.
Definition at line 1684 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::addWatches(), forAll, UPstream::master(), and Pstream::scatter().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::removeWatch().
|
virtual |
Helper: add watches for list of regIOobjects.
Reimplemented from fileOperation.
Definition at line 1708 of file masterUncollatedFileOperation.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), HashTable< T, Key, Hash >::erase(), f(), forAll, forAllConstIter(), masterUncollatedFileOperation::getFile(), and regIOobject::watchIndices().
Referenced by masterUncollatedFileOperation::findWatch(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Get name of file being watched (using handle)
Reimplemented from fileOperation.
Definition at line 1746 of file masterUncollatedFileOperation.C.
References UPstream::master(), Pstream::scatter(), and masterUncollatedFileOperation::updateStates().
Referenced by masterUncollatedFileOperation::addWatches(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Update state of all files.
Reimplemented from fileOperation.
Definition at line 1761 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::getState(), and UPstream::master().
Referenced by masterUncollatedFileOperation::getFile(), and masterUncollatedFileOperation::readDirOp::operator()().
|
virtual |
Get current state of file (using handle)
Reimplemented from fileOperation.
Definition at line 1775 of file masterUncollatedFileOperation.C.
References UPstream::master(), Pstream::scatter(), masterUncollatedFileOperation::setUnmodified(), and fileMonitor::UNMODIFIED.
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::updateStates().
|
virtual |
Set current state of file (using handle) to unmodified.
Reimplemented from fileOperation.
Definition at line 1790 of file masterUncollatedFileOperation.C.
References UPstream::master().
Referenced by masterUncollatedFileOperation::getState(), and masterUncollatedFileOperation::readDirOp::operator()().
|
static |
Same file?
Definition at line 383 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::readAndSend(), and List< T >::size().
Referenced by masterUncollatedFileOperation::objectPath(), masterUncollatedFileOperation::readDirOp::operator()(), and masterOFstream::~masterOFstream().
|
virtual |
Get sorted list of times.
Reimplemented from fileOperation.
Definition at line 1423 of file masterUncollatedFileOperation.C.
References Foam::endl(), fileOperation::findTimes(), UPstream::master(), Foam::Pout, Pstream::scatter(), masterUncollatedFileOperation::setTime(), and List< T >::xfer().
Referenced by masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::writeObject().
|
virtual |
Callback for time change.
Reimplemented from fileOperation.
Definition at line 1468 of file masterUncollatedFileOperation.C.
References List< T >::append(), TimePaths::constant(), Foam::endl(), Foam::findSortedIndex(), masterUncollatedFileOperation::NewIFstream(), Time::path(), Foam::Pout, fileOperation::setTime(), List< T >::size(), Foam::stableSort(), Time::timeName(), and dimensioned< Type >::value().
Referenced by masterUncollatedFileOperation::findTimes(), and masterUncollatedFileOperation::readDirOp::operator()().
|
static |
root+casename with any 'processorXXX' replaced by 'processsors'
Definition at line 216 of file masterUncollatedFileOperation.C.
References TimePaths::globalCaseName(), masterUncollatedFileOperation::processorsPath(), IOobject::rootPath(), and IOobject::time().
Referenced by masterUncollatedFileOperation::filePathInfo(), and masterUncollatedFileOperation::readDirOp::operator()().
|
static |
Like io.path with provided instance and any 'processorXXX'.
replaced by 'processsors'
Definition at line 229 of file masterUncollatedFileOperation.C.
References IOobject::db(), objectRegistry::dbDir(), and IOobject::local().
Referenced by fileOperation::findTimes(), masterUncollatedFileOperation::readDirOp::operator()(), and masterUncollatedFileOperation::processorsCasePath().
|
static |
Operating on fileName: replace processorXXX with processors.
Definition at line 244 of file masterUncollatedFileOperation.C.
References fileName::name(), fileName::null, fileName::path(), Foam::pos(), and masterUncollatedFileOperation::splitProcessorPath().
|
static |
Split fileName into part before processor and part after.
Returns -1 or processor number. Use with care.
Definition at line 265 of file masterUncollatedFileOperation.C.
References masterUncollatedFileOperation::objectPath(), Foam::pos(), and Foam::read().
Referenced by fileOperation::filePath(), masterUncollatedFileOperation::readDirOp::operator()(), masterUncollatedFileOperation::processorsPath(), fileOperation::readObjects(), uncollatedFileOperation::readStream(), and masterUncollatedFileOperation::readStream().
|
inline |
Return cached times.
Definition at line 692 of file masterUncollatedFileOperation.H.
References masterUncollatedFileOperation::times_.
|
mutableprotected |
Cached times for a given directory.
Definition at line 62 of file masterUncollatedFileOperation.H.
Referenced by masterUncollatedFileOperation::times().
|
static |
Max size of parallel communications. Switches from non-blocking.
to scheduled when reading/writing files. Read as float to enable easy specificiation of large sizes.
Definition at line 409 of file masterUncollatedFileOperation.H.
Referenced by masterUncollatedFileOperation::readDirOp::operator()().