Open CASCADE Technology 7.8.0
|
Management of directories (a set of directory oriented tools) More...
#include <OSD_Directory.hxx>
Public Member Functions | |
OSD_Directory () | |
Creates Directory object. It is initialized to an empty name. | |
OSD_Directory (const OSD_Path &theName) | |
Creates Directory object initialized with theName. | |
void | Build (const OSD_Protection &Protect) |
Creates (physically) a directory. When a directory of the same name already exists, no error is returned, and only <Protect> is applied to the existing directory. | |
Public Member Functions inherited from OSD_FileNode | |
void | Path (OSD_Path &Name) const |
Gets file name and path. | |
void | SetPath (const OSD_Path &Name) |
Sets file name and path. If a name is not found, it raises a program error. | |
Standard_Boolean | Exists () |
Returns TRUE if <me> exists. | |
void | Remove () |
Erases the FileNode from directory. | |
void | Move (const OSD_Path &NewPath) |
Moves <me> into another directory. | |
void | Copy (const OSD_Path &ToPath) |
Copies <me> to another FileNode. | |
OSD_Protection | Protection () |
Returns access mode of <me>. | |
void | SetProtection (const OSD_Protection &Prot) |
Changes protection of the FileNode. | |
Quantity_Date | AccessMoment () |
Returns last write access. On UNIX, AccessMoment and CreationMoment return the same value. | |
Quantity_Date | CreationMoment () |
Returns creation date. On UNIX, AccessMoment and CreationMoment return the same value. | |
Standard_Boolean | Failed () const |
Returns TRUE if an error occurs. | |
void | Reset () |
Resets error counter to zero. | |
void | Perror () |
Raises OSD_Error. | |
Standard_Integer | Error () const |
Returns error number if 'Failed' is TRUE. | |
Static Public Member Functions | |
static OSD_Directory | BuildTemporary () |
Creates a temporary Directory in current directory. This directory is automatically removed when object dies. | |
Additional Inherited Members | |
Protected Member Functions inherited from OSD_FileNode | |
OSD_FileNode () | |
Creates FileNode object This is to be used with SetPath . Allocate space for the file name and initializes this name to an empty name. | |
OSD_FileNode (const OSD_Path &Name) | |
Instantiates the object FileNode storing its name. If a name is not found, it raises a program error. | |
~OSD_FileNode () | |
Destructor is protected for safer inheritance. | |
Protected Attributes inherited from OSD_FileNode | |
OSD_Path | myPath |
OSD_Error | myError |
Management of directories (a set of directory oriented tools)
OSD_Directory::OSD_Directory | ( | ) |
Creates Directory object. It is initialized to an empty name.
Creates Directory object initialized with theName.
void OSD_Directory::Build | ( | const OSD_Protection & | Protect | ) |
Creates (physically) a directory. When a directory of the same name already exists, no error is returned, and only <Protect> is applied to the existing directory.
If Build is used and <me> is instantiated without a name, OSDError is raised.
|
static |
Creates a temporary Directory in current directory. This directory is automatically removed when object dies.