Public Member Functions | Protected Member Functions | List of all members
uncollatedFileOperation Class Reference

fileOperation that assumes file operations are local. More...

Inheritance diagram for uncollatedFileOperation:
Inheritance graph
[legend]
Collaboration diagram for uncollatedFileOperation:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("uncollated")
 
 uncollatedFileOperation (bool verbose)
 
virtual ~uncollatedFileOperation ()=default
 
virtual bool mkDir (const fileName &, mode_t=0777) const
 
virtual bool chMod (const fileName &, const mode_t) const
 
virtual mode_t mode (const fileName &, const bool followLink=true) const
 
virtual fileName::Type type (const fileName &, const bool followLink=true) const
 
virtual bool exists (const fileName &, const bool checkGzip=true, const bool followLink=true) const
 
virtual bool isDir (const fileName &, const bool followLink=true) const
 
virtual bool isFile (const fileName &, const bool checkGzip=true, const bool followLink=true) const
 
virtual off_t fileSize (const fileName &, const bool followLink=true) const
 
virtual time_t lastModified (const fileName &, const bool followLink=true) const
 
virtual double highResLastModified (const fileName &, const bool followLink=true) const
 
virtual fileNameList readDir (const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true) const
 
virtual bool cp (const fileName &src, const fileName &dst, const bool followLink=true) const
 
virtual bool ln (const fileName &src, const fileName &dst) const
 
virtual bool mv (const fileName &src, const fileName &dst, const bool followLink=false) const
 
virtual bool mvBak (const fileName &, const std::string &ext="bak") const
 
virtual bool rm (const fileName &) const
 
virtual bool rmDir (const fileName &dir, const bool silent=false) const
 
virtual fileName filePath (const bool checkGlobal, const IOobject &io, const word &typeName, const bool search) const
 
virtual fileName dirPath (const bool checkGlobal, const IOobject &io, const bool search) const
 
virtual fileNameList readObjects (const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
 
virtual bool readHeader (IOobject &, const fileName &, const word &typeName) const
 
virtual autoPtr< ISstreamreadStream (regIOobject &, const fileName &, const word &typeName, const bool procValid=true) const
 
virtual bool read (regIOobject &, const bool masterOnly, const IOstreamOption::streamFormat format, const word &typeName) const
 
virtual autoPtr< ISstreamNewIFstream (const fileName &) const
 
virtual autoPtr< OSstreamNewOFstream (const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
 
- Public Member Functions inherited from fileOperation
 TypeName ("fileOperation")
 
 fileOperation (const label comm, const bool distributedRoots=false)
 
 declareRunTimeSelectionTable (autoPtr, fileOperation, word,(bool verbose),(verbose))
 
virtual ~fileOperation ()=default
 
bool distributed () const noexcept
 
bool distributed (bool on) const noexcept
 
virtual fileName objectPath (const IOobject &io, const word &typeName) const
 
virtual bool writeObject (const regIOobject &io, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
 
virtual fileName filePath (const fileName &) const
 
virtual label addWatch (const fileName &) const
 
virtual bool removeWatch (const label) const
 
virtual label findWatch (const labelList &watchIndices, const fileName &) const
 
virtual void addWatches (regIOobject &, const fileNameList &) const
 
virtual fileName getFile (const label) const
 
virtual void updateStates (const bool masterOnly, const bool syncPar) const
 
virtual fileMonitor::fileState getState (const label) const
 
virtual void setUnmodified (const label) const
 
virtual word processorsDir (const IOobject &io) const
 
virtual word processorsDir (const fileName &) const
 
virtual void setNProcs (const label nProcs)
 
virtual label nProcs (const fileName &dir, const fileName &local="") const
 
virtual instantList findTimes (const fileName &, const word &) const
 
virtual IOobject findInstance (const IOobject &io, const scalar startValue, const word &stopInstance) const
 
virtual void setTime (const Time &) const
 
virtual void flush () const
 
fileName processorsCasePath (const IOobject &, const word &procDir) const
 
fileName processorsPath (const IOobject &, const word &instance, const word &procDir) const
 
fileName processorsPath (const fileName &, const word &procDir) const
 

Protected Member Functions

fileName filePathInfo (const bool checkGlobal, const bool isFile, const IOobject &io, const bool search) const
 
virtual refPtr< dirIndexListlookupProcessorsPath (const fileName &) const
 
- Protected Member Functions inherited from fileOperation
fileMonitormonitor () const
 
refPtr< dirIndexListlookupAndCacheProcessorsPath (const fileName &objectPath, const bool syncPar) const
 
bool exists (IOobject &io) const
 

Additional Inherited Members

- Public Types inherited from fileOperation
enum  pathType : int {
  NOTFOUND = 0, ABSOLUTE, OBJECT, WRITEOBJECT,
  PROCUNCOLLATED, PROCBASEOBJECT = PROCUNCOLLATED + 1, PROCOBJECT = PROCBASEOBJECT + 1, PARENTOBJECT,
  FINDINSTANCE, PROCUNCOLLATEDINSTANCE, PROCBASEINSTANCE, PROCINSTANCE
}
 
typedef Tuple2< fileName, Tuple2< pathType, int > > dirIndex
 
typedef List< dirIndexdirIndexList
 
typedef IntRange< int > procRangeType
 
- Static Public Member Functions inherited from fileOperation
static autoPtr< fileOperationNewUncollated ()
 
static autoPtr< fileOperationNew (const word &handlerType, bool verbose=false)
 
static instantList sortTimes (const fileNameList &dirEntries, const word &constantName="constant")
 
static label splitProcessorPath (const fileName &objectPath, fileName &path, fileName &procDir, fileName &local, procRangeType &group, label &nProcs)
 
static label detectProcessorPath (const fileName &objPath)
 
- Static Public Attributes inherited from fileOperation
static const Enum< pathTypepathTypeNames_
 
static word processorsBaseDir = "processors"
 
static word defaultFileHandler
 
static autoPtr< fileOperationfileHandlerPtr_
 
- Static Protected Member Functions inherited from fileOperation
static labelList ioRanks ()
 
static void mergeTimes (const instantList &extraTimes, const word &constantName, instantList &times)
 
static bool isFileOrDir (const bool isFile, const fileName &)
 
- Protected Attributes inherited from fileOperation
const label comm_
 
bool distributed_
 
HashTable< dirIndexListprocsDirs_
 
autoPtr< fileMonitormonitorPtr_
 

Detailed Description

fileOperation that assumes file operations are local.

Definition at line 45 of file uncollatedFileOperation.H.

Constructor & Destructor Documentation

◆ uncollatedFileOperation()

uncollatedFileOperation ( bool  verbose)
explicit

Definition at line 177 of file uncollatedFileOperation.C.

References DetailInfo, and Foam::endl().

Here is the call graph for this function:

◆ ~uncollatedFileOperation()

virtual ~uncollatedFileOperation ( )
virtualdefault

Member Function Documentation

◆ filePathInfo()

Foam::fileName filePathInfo ( const bool  checkGlobal,
const bool  isFile,
const IOobject io,
const bool  search 
) const
protected

◆ lookupProcessorsPath()

Foam::refPtr< Foam::fileOperation::dirIndexList > lookupProcessorsPath ( const fileName fName) const
protectedvirtual

Reimplemented from fileOperation.

Definition at line 165 of file uncollatedFileOperation.C.

◆ TypeName()

TypeName ( "uncollated"  )

◆ mkDir()

bool mkDir ( const fileName dir,
mode_t  mode = 0777 
) const
virtual

Implements fileOperation.

Definition at line 194 of file uncollatedFileOperation.C.

References Foam::mkDir(), and Foam::mode().

Here is the call graph for this function:

◆ chMod()

bool chMod ( const fileName fName,
const  mode_t 
) const
virtual

Implements fileOperation.

Definition at line 204 of file uncollatedFileOperation.C.

References Foam::chMod(), and Foam::mode().

Here is the call graph for this function:

◆ mode()

mode_t mode ( const fileName fName,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 214 of file uncollatedFileOperation.C.

References Foam::mode().

Here is the call graph for this function:

◆ type()

Foam::fileName::Type type ( const fileName fName,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 224 of file uncollatedFileOperation.C.

References Foam::type().

Here is the call graph for this function:

◆ exists()

bool exists ( const fileName fName,
const bool  checkGzip = true,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 234 of file uncollatedFileOperation.C.

References Foam::exists().

Here is the call graph for this function:

◆ isDir()

bool isDir ( const fileName fName,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 245 of file uncollatedFileOperation.C.

References Foam::isDir().

Here is the call graph for this function:

◆ isFile()

bool isFile ( const fileName fName,
const bool  checkGzip = true,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 255 of file uncollatedFileOperation.C.

References Foam::isFile().

Here is the call graph for this function:

◆ fileSize()

off_t fileSize ( const fileName fName,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 266 of file uncollatedFileOperation.C.

References Foam::fileSize().

Here is the call graph for this function:

◆ lastModified()

time_t lastModified ( const fileName fName,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 276 of file uncollatedFileOperation.C.

References Foam::lastModified().

Here is the call graph for this function:

◆ highResLastModified()

double highResLastModified ( const fileName fName,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 286 of file uncollatedFileOperation.C.

References Foam::highResLastModified().

Here is the call graph for this function:

◆ readDir()

Foam::fileNameList readDir ( const fileName dir,
const fileName::Type  type = fileName::FILE,
const bool  filtergz = true,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 325 of file uncollatedFileOperation.C.

References Foam::readDir().

Here is the call graph for this function:

◆ cp()

bool cp ( const fileName src,
const fileName dst,
const bool  followLink = true 
) const
virtual

Implements fileOperation.

Definition at line 337 of file uncollatedFileOperation.C.

References Foam::cp().

Here is the call graph for this function:

◆ ln()

bool ln ( const fileName src,
const fileName dst 
) const
virtual

Implements fileOperation.

Definition at line 348 of file uncollatedFileOperation.C.

References Foam::ln().

Here is the call graph for this function:

◆ mv()

bool mv ( const fileName src,
const fileName dst,
const bool  followLink = false 
) const
virtual

Implements fileOperation.

Definition at line 358 of file uncollatedFileOperation.C.

References Foam::mv().

Here is the call graph for this function:

◆ mvBak()

bool mvBak ( const fileName fName,
const std::string &  ext = "bak" 
) const
virtual

Implements fileOperation.

Definition at line 296 of file uncollatedFileOperation.C.

References Foam::mvBak().

Here is the call graph for this function:

◆ rm()

bool rm ( const fileName fName) const
virtual

Implements fileOperation.

Definition at line 306 of file uncollatedFileOperation.C.

References Foam::rm().

Here is the call graph for this function:

◆ rmDir()

bool rmDir ( const fileName dir,
const bool  silent = false 
) const
virtual

Implements fileOperation.

Definition at line 315 of file uncollatedFileOperation.C.

References Foam::rmDir().

Here is the call graph for this function:

◆ filePath()

Foam::fileName filePath ( const bool  checkGlobal,
const IOobject io,
const word typeName,
const bool  search 
) const
virtual

Implements fileOperation.

Definition at line 369 of file uncollatedFileOperation.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), IOobject::objectPath(), Foam::Pout, and Foam::search().

Here is the call graph for this function:

◆ dirPath()

Foam::fileName dirPath ( const bool  checkGlobal,
const IOobject io,
const bool  search 
) const
virtual

Implements fileOperation.

Definition at line 397 of file uncollatedFileOperation.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), IOobject::objectPath(), Foam::Pout, and Foam::search().

Here is the call graph for this function:

◆ readObjects()

Foam::fileNameList readObjects ( const objectRegistry db,
const fileName instance,
const fileName local,
word newInstance 
) const
virtual

Reimplemented from fileOperation.

Definition at line 424 of file uncollatedFileOperation.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Time::findInstancePath(), IOobject::objectPath(), Foam::Pout, and objectRegistry::time().

Here is the call graph for this function:

◆ readHeader()

bool readHeader ( IOobject io,
const fileName fName,
const word typeName 
) const
virtual

◆ readStream()

Foam::autoPtr< Foam::ISstream > readStream ( regIOobject io,
const fileName fName,
const word typeName,
const bool  procValid = true 
) const
virtual

◆ read()

bool read ( regIOobject io,
const bool  masterOnly,
const IOstreamOption::streamFormat  format,
const word typeName 
) const
virtual

◆ NewIFstream()

Foam::autoPtr< Foam::ISstream > NewIFstream ( const fileName filePath) const
virtual

Implements fileOperation.

Definition at line 696 of file uncollatedFileOperation.C.

◆ NewOFstream()

Foam::autoPtr< Foam::OSstream > NewOFstream ( const fileName pathname,
IOstreamOption  streamOpt = IOstreamOption(),
const bool  valid = true 
) const
virtual

Implements fileOperation.

Definition at line 706 of file uncollatedFileOperation.C.


The documentation for this class was generated from the following files: