32 #ifndef fileOperations_uncollatedFileOperation_H 33 #define fileOperations_uncollatedFileOperation_H 42 namespace fileOperations
60 const bool checkGlobal,
96 const bool followLink =
true 103 const bool followLink =
true 111 const bool checkGzip=
true,
112 const bool followLink =
true 119 const bool followLink =
true 127 const bool checkGzip=
true,
128 const bool followLink =
true 135 const bool followLink =
true 142 const bool followLink =
true 149 const bool followLink =
true 157 const bool filtergz=
true,
158 const bool followLink =
true 166 const bool followLink =
true 178 const bool followLink =
false 187 const std::string& ext =
"bak" 210 const bool checkGlobal,
219 const bool checkGlobal,
246 const word& typeName,
247 const bool procValid =
true 254 const bool masterOnly,
269 const bool valid =
true 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?
A class for handling file names.
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const
Rename src to dst.
virtual bool chMod(const fileName &, const mode_t) const
Set the file mode.
virtual mode_t mode(const fileName &, const bool followLink=true) const
Return the file mode.
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const
Read object header from supplied file.
virtual double highResLastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
virtual bool read(regIOobject &, const bool masterOnly, const IOstream::streamFormat format, const word &typeName) const
Top-level read.
word format(conversionProperties.lookup("format"))
virtual bool mkDir(const fileName &, mode_t=0777) const
Make directory.
virtual fileName filePath(const bool checkGlobal, const IOobject &, const word &typeName) const
Search for an object. checkGlobal : also check undecomposed case.
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?
fileOperation that assumes file operations are local.
virtual bool rmDir(const fileName &) const
Remove a directory and its contents.
TypeName("uncollated")
Runtime type information.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
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 isDir(const fileName &, const bool followLink=true) const
Does the name exist as a DIRECTORY in the file system?
virtual autoPtr< ISstream > NewIFstream(const fileName &) const
Generate an ISstream that reads a file.
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.
A class for handling words, derived from string.
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const
Copy, recursively if necessary, the source to the destination.
streamFormat
Enumeration for the format of data in the stream.
virtual off_t fileSize(const fileName &, const bool followLink=true) const
Return size of file.
virtual fileName dirPath(const bool checkGlobal, const IOobject &) const
Search for a directory. checkGlobal : also check undecomposed.
virtual time_t lastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
virtual bool rm(const fileName &) const
Remove a file, returning true if successful otherwise false.
compressionType
Enumeration for the format of data in the stream.
virtual bool ln(const fileName &src, const fileName &dst) const
Create a softlink. dst should not exist. Returns true if.
uncollatedFileOperation(const bool verbose)
Construct null.
virtual ~uncollatedFileOperation()
Destructor.
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 mvBak(const fileName &, const std::string &ext="bak") const
Rename to a corresponding backup file.
static const versionNumber currentVersion
Current version number.
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
Search directory for objects. Used in IOobjectList.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Registry of regIOobjects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual fileName::Type type(const fileName &, const bool followLink=true) const
Return the file type: DIRECTORY, FILE or LINK.
Type
Enumerations to handle file types and modes.