Public Types | |
enum | pathType { NOTFOUND, ABSOLUTE, OBJECT, WRITEOBJECT, PROCUNCOLLATED, PROCBASEOBJECT, PROCOBJECT, PARENTOBJECT, FINDINSTANCE, PROCUNCOLLATEDINSTANCE, PROCBASEINSTANCE, PROCINSTANCE } |
Enumeration for the location of an IOobject. More... | |
typedef Tuple2< fileName, Tuple2< pathType, label > > | dirIndex |
Description of processor directory naming: More... | |
typedef List< dirIndex > | dirIndexList |
Public Member Functions | |
TypeName ("fileOperation") | |
Runtime type information. More... | |
fileOperation (const label comm) | |
Construct null. More... | |
declareRunTimeSelectionTable (autoPtr, fileOperation, word,(const bool verbose),(verbose)) | |
virtual | ~fileOperation () |
Destructor. More... | |
virtual bool | mkDir (const fileName &, mode_t=0777) const =0 |
Make directory. More... | |
virtual bool | chMod (const fileName &, const mode_t) const =0 |
Set the file mode. More... | |
virtual mode_t | mode (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Return the file mode. More... | |
virtual fileType | type (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Return the file type: directory, file or link. More... | |
virtual bool | exists (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Does the name exist (as directory or file) in the file system? More... | |
virtual bool | isDir (const fileName &, const bool followLink=true) const =0 |
Does the name exist as a directory in the file system? More... | |
virtual bool | isFile (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Does the name exist as a file in the file system? More... | |
virtual off_t | fileSize (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Return size of file. More... | |
virtual time_t | lastModified (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Return time of last file modification. More... | |
virtual double | highResLastModified (const fileName &, const bool checkVariants=true, const bool followLink=true) const =0 |
Return time of last file modification. More... | |
virtual fileNameList | readDir (const fileName &, const fileType=fileType::file, const bool filterVariants=true, const bool followLink=true) const =0 |
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 =0 |
Copy, recursively if necessary, the source to the destination. More... | |
virtual bool | ln (const fileName &src, const fileName &dst) const =0 |
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 =0 |
Rename src to dst. More... | |
virtual bool | mvBak (const fileName &, const std::string &ext="bak") const =0 |
Rename to a corresponding backup file. More... | |
virtual bool | rm (const fileName &) const =0 |
Remove a file, returning true if successful otherwise false. More... | |
virtual bool | rmDir (const fileName &) const =0 |
Remove a directory and its contents. 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 bool checkGlobal, const IOobject &, const word &typeName) const =0 |
Search for an object. checkGlobal : also check undecomposed case. More... | |
virtual fileName | dirPath (const bool checkGlobal, const IOobject &) const =0 |
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 =0 |
Read object header from supplied file. More... | |
virtual autoPtr< ISstream > | readStream (regIOobject &, const fileName &, const word &typeName, const bool read=true) const =0 |
Reads header for regIOobject and returns an ISstream. More... | |
virtual bool | read (regIOobject &, const bool masterOnly, const IOstream::streamFormat defaultFormat, const word &typeName) const =0 |
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 write=true) const |
Writes a regIOobject (so header, contents and divider). More... | |
virtual fileName | filePath (const fileName &) const |
Search for a file or directory. Use IOobject version in. More... | |
virtual autoPtr< ISstream > | NewIFstream (const fileName &filePath, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion) const =0 |
Generate an ISstream that reads a file. More... | |
virtual autoPtr< Ostream > | NewOFstream (const fileName &filePath, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, const bool write=true) const =0 |
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 word | processorsDir (const IOobject &io) const |
Actual name of processors dir (for use in mode PROCOBJECT,. More... | |
virtual word | processorsDir (const fileName &) const |
Actual name of processors dir (for use in mode PROCOBJECT,. More... | |
virtual void | setNProcs (const label nProcs) |
Set number of processor directories/results. Only used in. More... | |
virtual label | nProcs (const fileName &dir, const fileName &local="") const |
Get number of processor directories/results. Used for e.g. More... | |
virtual instantList | findTimes (const fileName &, const word &) const |
Get sorted list of times. More... | |
virtual IOobject | findInstance (const IOobject &io, const scalar startValue, const word &stopInstance) const |
Find instance where IOobject is. Fails if cannot be found. More... | |
virtual void | setTime (const Time &) const |
Callback for time change. More... | |
virtual void | flush () const |
Forcibly wait until all output done. Flush any cached data. More... | |
fileName | processorsCasePath (const IOobject &, const word &procDir) const |
Generate path (like io.path) from root+casename with any. More... | |
fileName | processorsPath (const IOobject &, const word &instance, const word &procDir) const |
Generate path (like io.path) with provided instance and any. More... | |
fileName | processorsPath (const fileName &, const word &procDir) const |
Operating on fileName: replace processorXXX with procDir. More... | |
Static Public Member Functions | |
static autoPtr< fileOperation > | New (const word &type, const bool verbose) |
Select type. More... | |
static label | splitProcessorPath (const fileName &, fileName &path, fileName &procDir, fileName &local, label &groupStart, label &groupSize, label &nProcs) |
Split fileName into part before 'processor' and part after. More... | |
static label | detectProcessorPath (const fileName &) |
Detect processor number from '/aa/bb/processorDDD/cc'. More... | |
Static Public Attributes | |
static const NamedEnum< pathType, 12 > | pathTypeNames_ |
static word | processorsBaseDir = "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 | |
fileMonitor & | monitor () const |
void | cacheProcessorsPath (const fileName &fName) const |
Detect presence of processorsDDD. More... | |
tmpNrc< dirIndexList > | lookupProcessorsPath (const fileName &) const |
Lookup name of processorsDDD using cache. Return empty fileName. More... | |
bool | exists (IOobject &io) const |
Does ioobject exist. Is either a directory (empty name()) or. More... | |
Static Protected Member Functions | |
static instantList | sortTimes (const fileNameList &, const word &) |
Sort directory entries according to time value. More... | |
static void | mergeTimes (const instantList &extraTimes, const word &constantName, instantList ×) |
Merge two times. More... | |
static bool | isFileOrDir (const bool isFile, const fileName &) |
Helper: check for file (isFile) or directory (!isFile) More... | |
Protected Attributes | |
const label | comm_ |
Communicator to use. More... | |
HashTable< dirIndexList > | procsDirs_ |
Detected processors directories. More... | |
autoPtr< fileMonitor > | monitorPtr_ |
file-change monitor for all registered files More... | |
Definition at line 56 of file fileOperation.H.
Description of processor directory naming:
whether directory contains a range (so differs on different processors)
Definition at line 86 of file fileOperation.H.
typedef List<dirIndex> dirIndexList |
Definition at line 88 of file fileOperation.H.
enum pathType |
Enumeration for the location of an IOobject.
Enumerator | |
---|---|
NOTFOUND | |
ABSOLUTE | |
OBJECT | |
WRITEOBJECT | |
PROCUNCOLLATED | |
PROCBASEOBJECT | |
PROCOBJECT | |
PARENTOBJECT | |
FINDINSTANCE | |
PROCUNCOLLATEDINSTANCE | |
PROCBASEINSTANCE | |
PROCINSTANCE |
Definition at line 61 of file fileOperation.H.
fileOperation | ( | const label | comm | ) |
Construct null.
Definition at line 405 of file fileOperation.C.
References fileOperation::New().
|
virtual |
Destructor.
Definition at line 436 of file fileOperation.C.
References fileOperation::objectPath().
|
protected |
Definition at line 81 of file fileOperation.C.
References IOobject::fileModificationChecking, IOobject::inotify, IOobject::inotifyMaster, and fileOperation::sortTimes().
Referenced by fileOperation::addWatch(), fileOperation::getFile(), fileOperation::getState(), fileOperation::removeWatch(), fileOperation::setUnmodified(), and fileOperation::updateStates().
|
staticprotected |
Sort directory entries according to time value.
Definition at line 99 of file fileOperation.C.
References forAll, Foam::less(), fileOperation::mergeTimes(), Foam::readScalar(), List< T >::setSize(), List< T >::size(), and Foam::sort().
Referenced by fileOperation::findTimes(), and fileOperation::monitor().
|
staticprotected |
Merge two times.
Definition at line 154 of file fileOperation.C.
References UList< T >::end(), forAll, Foam::less(), Foam::name(), List< T >::setSize(), List< T >::size(), Foam::sort(), and List< T >::transfer().
Referenced by fileOperation::findTimes(), and fileOperation::sortTimes().
|
staticprotected |
Helper: check for file (isFile) or directory (!isFile)
Definition at line 227 of file fileOperation.C.
References Foam::isDir(), and Foam::isFile().
|
protected |
Detect presence of processorsDDD.
|
protected |
Lookup name of processorsDDD using cache. Return empty fileName.
if not found
Definition at line 236 of file fileOperation.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), Foam::directory, Foam::endl(), forAll, Foam::max(), UPstream::parRun(), path(), Foam::Pout, Foam::readDir(), Foam::returnReduce(), rp(), fileOperation::setNProcs(), and List< T >::size().
Referenced by fileOperation::filePath(), and fileOperation::findTimes().
|
protected |
Does ioobject exist. Is either a directory (empty name()) or.
a file
Definition at line 360 of file fileOperation.C.
References Foam::isDir(), Foam::isFile(), IOobject::name(), word::null, IOobject::objectPath(), and IOobject::typeHeaderOk().
Referenced by fileOperation::filePath(), fileOperation::findInstance(), and Time::setControls().
TypeName | ( | "fileOperation" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
fileOperation | , | ||
word | , | ||
(const bool verbose) | , | ||
(verbose) | |||
) |
|
static |
Select type.
Definition at line 412 of file fileOperation.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by Foam::fileHandler(), fileOperation::fileOperation(), and argList::parse().
|
pure virtual |
Make directory.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by Foam::cpFiles(), and fileOperation::writeObject().
|
pure virtual |
Set the file mode.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Return the file mode.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Return the file type: directory, file or link.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Does the name exist (as directory or file) in the file system?
Optionally enable/disable check for gzip file.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Does the name exist as a directory in the file system?
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Does the name exist as a file in the file system?
Optionally enable/disable check for gzip file.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Return size of file.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Return time of last file modification.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Return time of last file modification.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Read a directory and return the entries as a string list.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by Foam::cpFiles(), and Foam::search().
|
pure virtual |
Copy, recursively if necessary, the source to the destination.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by Foam::cpFiles().
Create a softlink. dst should not exist. Returns true if.
successful.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Rename src to dst.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Rename to a corresponding backup file.
If the backup file already exists, attempt with "01" .. "99" suffix
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Remove a file, returning true if successful otherwise false.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Remove a directory and its contents.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by Time::writeObject().
|
virtual |
Generate disk file name for object. Opposite of filePath.
Optional wanted typeName.
Reimplemented in collatedFileOperation.
Definition at line 443 of file fileOperation.C.
References IOobject::objectPath(), and fileOperation::writeObject().
Referenced by fileOperation::splitProcessorPath(), and fileOperation::~fileOperation().
|
pure virtual |
Search for an object. checkGlobal : also check undecomposed case.
Optional wanted typeName.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by IOobject::globalFilePath(), IOobject::localFilePath(), fileOperation::readObjects(), and fileOperation::writeObject().
Search for a directory. checkGlobal : also check undecomposed.
case
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
virtual |
Search directory for objects. Used in IOobjectList.
Reimplemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Definition at line 878 of file fileOperation.C.
References objectRegistry::dbDir(), Foam::endl(), Foam::file, fileOperation::filePath(), Foam::isDir(), word::null, IOobject::objectPath(), path(), IOobject::path(), Foam::Pout, and Foam::readDir().
Referenced by fileOperation::findInstance(), IOobjectList::IOobjectList(), uncollatedFileOperation::readObjects(), and masterUncollatedFileOperation::readObjects().
|
pure virtual |
Read object header from supplied file.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by regIOobject::headerOk(), and IOobject::typeHeaderOk().
|
pure virtual |
Reads header for regIOobject and returns an ISstream.
to read the contents.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by regIOobject::readHeaderOk().
|
pure virtual |
Top-level read.
Format set to ASCII if defaultFormat and file format are ASCII
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by regIOobject::read(), and regIOobject::readHeaderOk().
|
virtual |
Writes a regIOobject (so header, contents and divider).
Returns success state. Default action is to write to the objectPath using writeData. If !write the file does not need to be written (this is used e.g. to suppress empty local lagrangian data)
Reimplemented in masterUncollatedFileOperation, and collatedFileOperation.
Definition at line 453 of file fileOperation.C.
References fileOperation::filePath(), IOstream::good(), fileOperation::mkDir(), fileOperation::NewOFstream(), IOobject::objectPath(), fileName::path(), regIOobject::writeData(), IOobject::writeEndDivider(), and IOobject::writeHeader().
Referenced by fileOperation::objectPath(), and regIOobject::writeObject().
|
virtual |
Search for a file or directory. Use IOobject version in.
preference
Definition at line 508 of file fileOperation.C.
References Foam::endl(), fileOperation::exists(), forAll, fileOperation::lookupProcessorsPath(), fileName::null, path(), Foam::Pout, fileOperation::splitProcessorPath(), and WarningInFunction.
|
pure virtual |
Generate an ISstream that reads a file.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
|
pure virtual |
Generate an Ostream that writes a file.
Implemented in masterUncollatedFileOperation, and uncollatedFileOperation.
Referenced by fileOperation::writeObject().
|
virtual |
Add watching of a file. Returns handle.
Reimplemented in masterUncollatedFileOperation.
Definition at line 569 of file fileOperation.C.
References fileMonitor::addWatch(), and fileOperation::monitor().
Referenced by fileOperation::addWatches().
|
virtual |
Remove watch on a file (using handle)
Reimplemented in masterUncollatedFileOperation.
Definition at line 575 of file fileOperation.C.
References fileOperation::findWatch(), fileOperation::monitor(), and fileMonitor::removeWatch().
Referenced by regIOobject::addWatch(), fileOperation::addWatches(), regIOobject::checkOut(), and regIOobject::read().
|
virtual |
Find index (or -1) of file in list of handles.
Reimplemented in masterUncollatedFileOperation.
Definition at line 582 of file fileOperation.C.
References fileOperation::addWatches(), forAll, and fileOperation::getFile().
Referenced by regIOobject::addWatch(), fileOperation::addWatches(), and fileOperation::removeWatch().
|
virtual |
Helper: add watches for list of regIOobjects.
Reimplemented in masterUncollatedFileOperation.
Definition at line 599 of file fileOperation.C.
References fileOperation::addWatch(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), HashTable< T, Key, Hash >::erase(), f(), fileOperation::findWatch(), forAll, forAllConstIter(), fileOperation::removeWatch(), and regIOobject::watchIndices().
Referenced by fileOperation::findWatch().
|
virtual |
Get name of file being watched (using handle)
Reimplemented in masterUncollatedFileOperation.
Definition at line 636 of file fileOperation.C.
References fileMonitor::getFile(), fileOperation::monitor(), and fileOperation::updateStates().
Referenced by regIOobject::addWatch(), fileOperation::findWatch(), regIOobject::read(), regIOobject::readHeaderOk(), and regIOobject::readIfModified().
|
virtual |
Update state of all files.
Reimplemented in masterUncollatedFileOperation.
Definition at line 643 of file fileOperation.C.
References fileOperation::getState(), fileOperation::monitor(), UPstream::parRun(), and fileMonitor::updateStates().
Referenced by fileOperation::getFile(), and Time::readModifiedObjects().
|
virtual |
Get current state of file (using handle)
Reimplemented in masterUncollatedFileOperation.
Definition at line 653 of file fileOperation.C.
References fileMonitor::getState(), and fileOperation::monitor().
Referenced by fileOperation::updateStates().
|
virtual |
Set current state of file (using handle) to unmodified.
Reimplemented in masterUncollatedFileOperation.
Definition at line 661 of file fileOperation.C.
References fileOperation::findTimes(), fileOperation::monitor(), and fileMonitor::setUnmodified().
Referenced by regIOobject::writeObject().
Actual name of processors dir (for use in mode PROCOBJECT,.
PROCINSTANCE)
Reimplemented in collatedFileOperation.
Definition at line 457 of file fileOperation.H.
Referenced by masterUncollatedFileOperation::readDirOp::operator()().
Actual name of processors dir (for use in mode PROCOBJECT,.
PROCINSTANCE)
Reimplemented in collatedFileOperation.
Definition at line 464 of file fileOperation.H.
|
virtual |
Set number of processor directories/results. Only used in.
decomposePar
Reimplemented in collatedFileOperation.
Definition at line 917 of file fileOperation.C.
References fileOperation::nProcs().
Referenced by fileOperation::lookupProcessorsPath().
|
virtual |
Get number of processor directories/results. Used for e.g.
reconstructPar, argList checking
Definition at line 922 of file fileOperation.C.
References fileOperation::comm_, Foam::directory, Foam::endl(), forAll, Foam::isDir(), Foam::isFile(), UPstream::master(), Foam::max(), polyMesh::meshSubDir, UPstream::msgType(), n, decomposedBlockData::numBlocks(), path(), fileOperation::processorsBaseDir, Foam::readDir(), Pstream::scatter(), fileOperation::splitProcessorPath(), and WarningInFunction.
Referenced by fileOperation::detectProcessorPath(), fileOperation::setNProcs(), fileOperation::setTime(), and fileOperation::splitProcessorPath().
|
virtual |
Get sorted list of times.
Reimplemented in masterUncollatedFileOperation.
Definition at line 668 of file fileOperation.C.
References Foam::directory, Foam::endl(), fileOperation::findInstance(), forAll, fileOperation::lookupProcessorsPath(), fileOperation::mergeTimes(), Foam::Pout, fileOperation::processorsPath(), Foam::readDir(), and fileOperation::sortTimes().
Referenced by Time::findTimes(), masterUncollatedFileOperation::findTimes(), masterUncollatedFileOperation::readObjects(), and fileOperation::setUnmodified().
|
virtual |
Find instance where IOobject is. Fails if cannot be found.
and readOpt() is MUST_READ/MUST_READ_IF_MODIFIED. Otherwise returns stopInstance.
Reimplemented in masterUncollatedFileOperation.
Definition at line 726 of file fileOperation.C.
References TimePaths::constant(), Foam::endl(), fileOperation::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, InfoInFunction, IOobject::instance(), IOobject::local(), IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED, Foam::name(), IOobject::name(), fileOperation::readObjects(), IOobject::readOpt(), List< T >::size(), IOobject::time(), and Time::times().
Referenced by fileOperation::findTimes().
|
inlinevirtual |
Callback for time change.
Reimplemented in masterUncollatedFileOperation.
Definition at line 495 of file fileOperation.H.
References Foam::cpFiles(), fileOperation::detectProcessorPath(), Foam::directory, Foam::file, Foam::fileHandler(), fileOperation::flush(), fileOperation::nProcs(), path(), fileOperation::processorsCasePath(), fileOperation::processorsPath(), Foam::search(), and fileOperation::splitProcessorPath().
Referenced by Time::setTime(), and masterUncollatedFileOperation::setTime().
|
virtual |
Forcibly wait until all output done. Flush any cached data.
Reimplemented in masterUncollatedFileOperation, and collatedFileOperation.
Definition at line 984 of file fileOperation.C.
References Foam::endl(), Foam::Pout, fileOperation::processorsCasePath(), and fileOperation::procsDirs_.
Referenced by masterUncollatedFileOperation::flush(), and fileOperation::setTime().
Foam::fileName processorsCasePath | ( | const IOobject & | io, |
const word & | procDir | ||
) | const |
Generate path (like io.path) from root+casename with any.
'processorXXX' replaced by procDir (usually 'processors')
Definition at line 996 of file fileOperation.C.
References TimePaths::globalCaseName(), fileOperation::processorsPath(), IOobject::rootPath(), and IOobject::time().
Referenced by fileOperation::flush(), fileOperation::processorsPath(), and fileOperation::setTime().
Foam::fileName processorsPath | ( | const IOobject & | io, |
const word & | instance, | ||
const word & | procDir | ||
) | const |
Generate path (like io.path) with provided instance and any.
'processorXXX' replaced by procDir (usually 'processors')
Definition at line 1006 of file fileOperation.C.
References IOobject::db(), objectRegistry::dbDir(), IOobject::local(), and fileOperation::processorsCasePath().
Referenced by fileOperation::findTimes(), fileOperation::processorsCasePath(), and fileOperation::setTime().
Foam::fileName processorsPath | ( | const fileName & | dir, |
const word & | procDir | ||
) | const |
Operating on fileName: replace processorXXX with procDir.
Definition at line 1021 of file fileOperation.C.
References Foam::endl(), fileName::name(), fileName::null, fileName::path(), Foam::pos(), fileOperation::splitProcessorPath(), and WarningInFunction.
|
static |
Split fileName into part before 'processor' and part after.
Returns -1 or processor number and optionally number of processors. Use with care.
Definition at line 1048 of file fileOperation.C.
References f(), n, fileOperation::nProcs(), fileOperation::objectPath(), Foam::pos(), and Foam::read().
Referenced by fileOperation::detectProcessorPath(), fileOperation::filePath(), fileOperation::nProcs(), fileOperation::processorsPath(), and fileOperation::setTime().
|
static |
Detect processor number from '/aa/bb/processorDDD/cc'.
Definition at line 1169 of file fileOperation.C.
References fileOperation::nProcs(), path(), and fileOperation::splitProcessorPath().
Referenced by fileOperation::setTime().
|
static |
Definition at line 79 of file fileOperation.H.
Referenced by masterUncollatedFileOperation::filePath(), and NamedEnum< compressibleField, 8 >::names().
|
protected |
Communicator to use.
Definition at line 96 of file fileOperation.H.
Referenced by fileOperation::nProcs().
|
mutableprotected |
Detected processors directories.
Definition at line 99 of file fileOperation.H.
Referenced by fileOperation::flush().
|
mutableprotected |
file-change monitor for all registered files
Definition at line 102 of file fileOperation.H.
|
static |
Return the processors directory name (usually "processors")
Definition at line 140 of file fileOperation.H.
Referenced by NamedEnum< compressibleField, 8 >::names(), and fileOperation::nProcs().
|
static |
Default fileHandler.
Definition at line 143 of file fileOperation.H.
Referenced by argList::argList(), Foam::fileHandler(), NamedEnum< compressibleField, 8 >::names(), and argList::parse().
|
static |
Static fileOperation.
Definition at line 153 of file fileOperation.H.
Referenced by Foam::fileHandler().