32 #ifndef fileOperations_uncollatedFileOperation_H 33 #define fileOperations_uncollatedFileOperation_H 41 namespace fileOperations
59 const bool checkGlobal,
95 const bool checkVariants =
true,
96 const bool followLink =
true 103 const bool checkVariants =
true,
104 const bool followLink =
true 112 const bool checkVariants =
true,
113 const bool followLink =
true 120 const bool followLink =
true 128 const bool checkVariants =
true,
129 const bool followLink =
true 136 const bool checkVariants =
true,
137 const bool followLink =
true 144 const bool checkVariants =
true,
145 const bool followLink =
true 152 const bool checkVariants =
true,
153 const bool followLink =
true 161 const bool filtergz=
true,
162 const bool followLink =
true 170 const bool followLink =
true 182 const bool followLink =
false 191 const std::string& ext =
"bak" 206 const bool checkGlobal,
215 const bool checkGlobal,
242 const word& typeName,
243 const bool read =
true 251 const bool masterOnly,
271 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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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.
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.
virtual autoPtr< ISstream > NewIFstream(const fileName &filePath, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion) const
Generate an ISstream that reads a file.
virtual bool read(regIOobject &, const bool masterOnly, const IOstream::streamFormat defaultFormat, const word &typeName) const
Top-level read.
virtual bool isDir(const fileName &, const bool followLink=true) const
Does the name exist as a directory in the file system?
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.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
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?
virtual autoPtr< Ostream > NewOFstream(const fileName &filePath, 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.