32 #ifndef fileOperations_uncollatedFileOperation_H 33 #define fileOperations_uncollatedFileOperation_H 42 namespace fileOperations
60 const bool checkGlobal,
96 const bool checkVariants =
true,
97 const bool followLink =
true 104 const bool checkVariants =
true,
105 const bool followLink =
true 113 const bool checkVariants =
true,
114 const bool followLink =
true 121 const bool followLink =
true 129 const bool checkVariants =
true,
130 const bool followLink =
true 137 const bool checkVariants =
true,
138 const bool followLink =
true 145 const bool checkVariants =
true,
146 const bool followLink =
true 153 const bool checkVariants =
true,
154 const bool followLink =
true 162 const bool filtergz=
true,
163 const bool followLink =
true 171 const bool followLink =
true 183 const bool followLink =
false 192 const std::string& ext =
"bak" 215 const bool checkGlobal,
224 const bool checkGlobal,
251 const word& typeName,
252 const bool read =
true 259 const bool masterOnly,
274 const bool write =
true A class for handling file names.
virtual fileNameList readDir(const fileName &, const fileType=fileType::file, const bool filtergz=true, const bool followLink=true) const
Read a directory and return the entries as a string list.
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 autoPtr< Ostream > NewOFstream(const fileName &pathname, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, const bool write=true) const
Generate an Ostream that writes a file.
virtual double highResLastModified(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Return time of last file modification.
virtual off_t fileSize(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Return size of file.
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const
Read object header from supplied file.
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 fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Return the file type: directory, file or link.
fileOperation that assumes file operations are local.
virtual bool rmDir(const fileName &) const
Remove a directory and its contents.
TypeName("uncollated")
Runtime type information.
virtual autoPtr< ISstream > readStream(regIOobject &, const fileName &, const word &typeName, const bool read=true) const
Reads header for regIOobject and returns an ISstream.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
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.
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 fileName dirPath(const bool checkGlobal, const IOobject &) const
Search for a directory. checkGlobal : also check undecomposed.
fileType
Enumeration of file types.
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.
virtual time_t lastModified(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Return time of last file modification.
uncollatedFileOperation(const bool verbose)
Construct null.
virtual mode_t mode(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Return the file mode.
virtual ~uncollatedFileOperation()
Destructor.
virtual bool exists(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Does the name exist (as directory or file) in the file system?
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 bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true) const
Does the name exist as a FILE in the file system?