Open CASCADE Technology  7.4.0
Public Member Functions | Static Public Member Functions

OSD_Directory Class Reference

Management of directories (a set of directory oriented tools) More...

#include <OSD_Directory.hxx>

Inheritance diagram for OSD_Directory:
Inheritance graph
[legend]

Public Member Functions

 OSD_Directory ()
 Creates Directory object. It is initiliazed to an empty name. More...
 
 OSD_Directory (const OSD_Path &theName)
 Creates Directory object initialized with theName. More...
 
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. More...
 
- Public Member Functions inherited from OSD_FileNode
void Path (OSD_Path &Name) const
 Gets file name and path. More...
 
void SetPath (const OSD_Path &Name)
 Sets file name and path. If a name is not found, it raises a program error. More...
 
Standard_Boolean Exists ()
 Returns TRUE if <me> exists. More...
 
void Remove ()
 Erases the FileNode from directory. More...
 
void Move (const OSD_Path &NewPath)
 Moves <me> into another directory. More...
 
void Copy (const OSD_Path &ToPath)
 Copies <me> to another FileNode. More...
 
OSD_Protection Protection ()
 Returns access mode of <me>. More...
 
void SetProtection (const OSD_Protection &Prot)
 Changes protection of the FileNode. More...
 
Quantity_Date AccessMoment ()
 Returns last write access. On UNIX, AccessMoment and CreationMoment return the same value. More...
 
Quantity_Date CreationMoment ()
 Returns creation date. On UNIX, AccessMoment and CreationMoment return the same value. More...
 
Standard_Boolean Failed () const
 Returns TRUE if an error occurs. More...
 
void Reset ()
 Resets error counter to zero. More...
 
void Perror ()
 Raises OSD_Error. More...
 
Standard_Integer Error () const
 Returns error number if 'Failed' is TRUE. More...
 

Static Public Member Functions

static OSD_Directory BuildTemporary ()
 Creates a temporary Directory in current directory. This directory is automatically removed when object dies. More...
 

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. More...
 
 OSD_FileNode (const OSD_Path &Name)
 Instantiates the object FileNode storing its name. If a name is not found, it raises a program error. More...
 
 ~OSD_FileNode ()
 Destructor is protected for safer inheritance. More...
 
- Protected Attributes inherited from OSD_FileNode
OSD_Path myPath
 
OSD_Error myError
 

Detailed Description

Management of directories (a set of directory oriented tools)

Constructor & Destructor Documentation

◆ OSD_Directory() [1/2]

OSD_Directory::OSD_Directory ( )

Creates Directory object. It is initiliazed to an empty name.

◆ OSD_Directory() [2/2]

OSD_Directory::OSD_Directory ( const OSD_Path theName)

Creates Directory object initialized with theName.

Member Function Documentation

◆ Build()

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.

◆ BuildTemporary()

static OSD_Directory OSD_Directory::BuildTemporary ( )
static

Creates a temporary Directory in current directory. This directory is automatically removed when object dies.


The documentation for this class was generated from the following file: