35#ifndef Foam_fileOperations_uncollatedFileOperation_H
36#define Foam_fileOperations_uncollatedFileOperation_H
59 mutable label managedComm_;
65 void init(
bool verbose);
77 const bool checkGlobal,
107 const bool distributedRoots,
135 const bool followLink =
true
142 const bool followLink =
true
150 const bool checkGzip=
true,
151 const bool followLink =
true
158 const bool followLink =
true
166 const bool checkGzip=
true,
167 const bool followLink =
true
174 const bool followLink =
true
181 const bool followLink =
true
188 const bool followLink =
true
196 const bool filtergz=
true,
197 const bool followLink =
true
205 const bool followLink =
true
217 const bool followLink =
false
226 const std::string& ext =
"bak"
239 const bool silent =
false,
240 const bool emptyOnly =
false
250 const bool checkGlobal,
260 const bool checkGlobal,
289 const bool readOnProc =
true
296 const bool masterOnly,
311 const bool writeOnProc =
true
320 const bool writeOnProc =
true
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A simple container for options an IOstream can normally have.
streamFormat
Data format (ascii | binary | coherent).
atomicType
Atomic operations (output).
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class for handling file names.
Type
Enumerations to handle directory entry types.
fileOperation(const label comm, const labelUList &ioRanks=labelUList::null(), const bool distributedRoots=false)
Construct from communicator, optionally with specified io-ranks and/or distributed roots.
virtual fileName objectPath(const IOobject &io, const word &typeName) const
Generate disk file name for object. Opposite of filePath.
virtual double highResLastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
TypeName("uncollated")
Runtime type information.
fileName filePathInfo(const bool checkGlobal, const bool isFile, const IOobject &io, const bool search) const
Search for an object.
virtual autoPtr< OSstream > NewOFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool writeOnProc=true) const
Generate an OSstream that writes a file.
virtual ~uncollatedFileOperation()
Destructor.
virtual bool rmDir(const fileName &dir, const bool silent=false, const bool emptyOnly=false) const
Remove a directory and its contents.
virtual mode_t mode(const fileName &, const bool followLink=true) const
Return the file mode.
virtual autoPtr< ISstream > readStream(regIOobject &, const fileName &, const word &typeName, const bool readOnProc=true) const
Reads header for regIOobject and returns an ISstream to read the contents.
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.
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const
Read object header from supplied file.
virtual bool mvBak(const fileName &, const std::string &ext="bak") const
Rename to a corresponding backup file.
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
Search directory for objects. Used in IOobjectList.
virtual bool read(regIOobject &, const bool masterOnly, const IOstreamOption::streamFormat format, const word &typeName) const
Top-level read.
virtual time_t lastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
virtual fileName dirPath(const bool checkGlobal, const IOobject &io, const bool search) const
Search for a directory.
virtual bool chMod(const fileName &, const mode_t) const
Set the file mode.
virtual refPtr< dirIndexList > lookupProcessorsPath(const fileName &objectPath) const
Lookup name of processorsDDD using cache.
virtual off_t fileSize(const fileName &, const bool followLink=true) const
Return size of file.
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?
virtual bool rm(const fileName &) const
Remove a file, returning true if successful otherwise false.
virtual autoPtr< ISstream > NewIFstream(const fileName &) const
Generate an ISstream that reads a file.
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?
virtual bool isDir(const fileName &, const bool followLink=true) const
Does the name exist as a DIRECTORY in the file system?
virtual fileName filePath(const bool checkGlobal, const IOobject &io, const word &typeName, const bool search) const
Search for an object.
uncollatedFileOperation(bool verbose=false)
Default construct.
virtual void storeComm() const
Transfer ownership of communicator to this fileOperation. Use with caution.
virtual bool mkDir(const fileName &, mode_t=0777) const
Make directory.
virtual fileName::Type type(const fileName &, const bool followLink=true) const
Return the file type: DIRECTORY, FILE or SYMLINK.
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const
Rename src to dst.
virtual bool ln(const fileName &src, const fileName &dst) const
Create a softlink. dst should not exist. Returns true if.
Registry of regIOobjects.
A class for managing references or pointers (no reference counting).
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for handling words, derived from Foam::string.
Namespace for implementations of a fileOperation.
List< fileName > fileNameList
List of fileName.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
word format(conversionProperties.get< word >("format"))
const volScalarField & cp
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.