37 namespace fileOperations
109 const bool followLink
113 return fileName::Type::UNDEFINED;
120 const bool checkGzip,
121 const bool followLink
132 const bool followLink
143 const bool checkGzip,
144 const bool followLink
155 const bool followLink
166 const bool followLink
177 const bool followLink
191 const bool followLink
203 const bool followLink
226 const bool followLink
237 const std::string& ext
271 const bool checkGlobal,
273 const word& typeName,
284 const bool checkGlobal,
325 const word& typeName,
326 const bool readOnProc
337 const bool masterOnly,
363 const bool writeOnProc
377 const bool writeOnProc
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 bool mkDir(const fileName &, mode_t=0777) const
Make directory.
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const
Copy, recursively if necessary, the source to the destination.
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?
A class for handling file names.
virtual double highResLastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
virtual bool rm(const fileName &) const
Remove a file, returning true if successful otherwise false.
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
dummyFileOperation(bool verbose=false)
Default construct.
A simple container for options an IOstream can normally have.
virtual ~dummyFileOperation()
Destructor.
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 readHeader(IOobject &, const fileName &, const word &typeName) const
Read object header from supplied file.
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const
Rename src to dst.
An encapsulation of filesystem-related operations.
virtual autoPtr< ISstream > NewIFstream(const fileName &) const
Generate an ISstream that reads a file.
virtual bool mvBak(const fileName &, const std::string &ext="bak") const
Rename to a corresponding backup file.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
atomicType
Atomic operations (output)
defineTypeName(dummyFileOperation)
A class for handling words, derived from Foam::string.
virtual mode_t mode(const fileName &, const bool followLink=true) const
Return the file mode.
virtual bool rmDir(const fileName &dir, const bool silent=false, const bool emptyOnly=false) const
Remove a directory and its contents.
virtual off_t fileSize(const fileName &, const bool followLink=true) const
Return size of file.
virtual bool isDir(const fileName &, const bool followLink=true) const
Does the name exist as a DIRECTORY in the file system?
virtual autoPtr< OSstream > NewOFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool writeOnProc=true) const
Generate an OSstream that writes a file.
word format(conversionProperties.get< word >("format"))
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 time_t lastModified(const fileName &, const bool followLink=true) const
Return time of last file modification.
virtual bool chMod(const fileName &, const mode_t) const
Set the file mode.
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 ln(const fileName &src, const fileName &dst) const
Create a softlink. dst should not exist. Returns true if.
virtual fileName dirPath(const bool checkGlobal, const IOobject &io, const bool search) const
Search for a directory. checkGlobal.
streamFormat
Data format (ascii | binary)
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual fileName::Type type(const fileName &, const bool followLink=true) const
Return the file type: DIRECTORY, FILE or SYMLINK.
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
virtual fileName filePath(const bool checkGlobal, const IOobject &io, const word &typeName, const bool search) const
Search for an object. checkGlobal.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Registry of regIOobjects.
List< fileName > fileNameList
List of fileName.
Dummy input stream, which can be used as a placeholder for interfaces taking an Istream or ISstream...
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Defines the attributes of an object for which implicit objectRegistry management is supported...
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
Inter-processor communications stream.
Type
Enumerations to handle directory entry types.