Go to the documentation of this file.
35 #ifndef fileOperations_uncollatedFileOperation_H
36 #define fileOperations_uncollatedFileOperation_H
45 namespace fileOperations
65 const bool checkGlobal,
109 const bool followLink =
true
116 const bool followLink =
true
124 const bool checkGzip=
true,
125 const bool followLink =
true
132 const bool followLink =
true
140 const bool checkGzip=
true,
141 const bool followLink =
true
148 const bool followLink =
true
155 const bool followLink =
true
162 const bool followLink =
true
170 const bool filtergz=
true,
171 const bool followLink =
true
179 const bool followLink =
true
191 const bool followLink =
false
200 const std::string& ext =
"bak"
210 const bool silent =
false
227 const bool checkGlobal,
229 const word& typeName,
237 const bool checkGlobal,
265 const word& typeName,
266 const bool procValid =
true
273 const bool masterOnly,
286 const bool valid =
true
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling words, derived from Foam::string.
An encapsulation of filesystem-related operations.
A class for handling file names.
virtual bool mkDir(const fileName &, mode_t=0777) const
Make directory.
virtual bool rm(const fileName &) const
Remove a file, returning true if successful otherwise false.
Type
Enumerations to handle directory entry types.
virtual mode_t mode(const fileName &, const bool followLink=true) const
Return the file mode.
fileName filePathInfo(const bool checkGlobal, const bool isFile, const IOobject &io, const bool search) const
Search for an object.
virtual bool mvBak(const fileName &, const std::string &ext="bak") const
Rename to a corresponding backup file.
virtual fileName dirPath(const bool checkGlobal, const IOobject &io, const bool search) const
Search for a directory. checkGlobal : also check undecomposed.
virtual bool chMod(const fileName &, const mode_t) const
Set the file mode.
virtual fileName filePath(const bool checkGlobal, const IOobject &io, const word &typeName, const bool search) const
Search for an object. checkGlobal : also check undecomposed case.
Registry of regIOobjects.
virtual off_t fileSize(const fileName &, const bool followLink=true) const
Return size of file.
word format(conversionProperties.get< word >("format"))
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const
Read object header from supplied file.
virtual ~uncollatedFileOperation()=default
Destructor.
A class for managing temporary objects without reference counting.
virtual double highResLastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const
Rename src to dst.
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat
Data format (ascii | binary)
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
Search directory for objects. Used in IOobjectList.
TypeName("uncollated")
Runtime type information.
virtual autoPtr< ISstream > NewIFstream(const fileName &) const
Generate an ISstream that reads a file.
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 tmpNrc< dirIndexList > lookupProcessorsPath(const fileName &) const
Lookup name of processorsDDD using cache. Return empty fileName.
virtual bool isDir(const fileName &, const bool followLink=true) const
Does the name exist as a DIRECTORY in the file system?
virtual bool rmDir(const fileName &dir, const bool silent=false) const
Remove a directory and its contents.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
fileOperation that assumes file operations are local.
virtual bool ln(const fileName &src, const fileName &dst) const
Create a softlink. dst should not exist. Returns true if.
uncollatedFileOperation(bool verbose)
Construct null.
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
virtual bool read(regIOobject &, const bool masterOnly, const IOstream::streamFormat format, const word &typeName) const
Top-level read.
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 autoPtr< ISstream > readStream(regIOobject &, const fileName &, const word &typeName, const bool procValid=true) const
Reads header for regIOobject and returns an ISstream.
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const
Copy, recursively if necessary, the source to the destination.
virtual autoPtr< OSstream > NewOFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
Generate an OSstream that writes 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 fileName::Type type(const fileName &, const bool followLink=true) const
Return the file type: DIRECTORY, FILE or LINK.
virtual time_t lastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.