Open CASCADE Technology  7.1.0.beta
Public Member Functions | Protected Member Functions | Protected Attributes

OSD_FileNode Class Reference

A class for 'File' and 'Directory' grouping common methods (file/directory manipulation tools). The "file oriented" name means files or directories which are in fact hard coded as files. More...

#include <OSD_FileNode.hxx>

Inheritance diagram for OSD_FileNode:
Inheritance graph
[legend]

Public Member Functions

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...
 

Protected Member Functions

 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

OSD_Path myPath
 
OSD_Error myError
 

Detailed Description

A class for 'File' and 'Directory' grouping common methods (file/directory manipulation tools). The "file oriented" name means files or directories which are in fact hard coded as files.

Constructor & Destructor Documentation

OSD_FileNode::OSD_FileNode ( )
protected

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::OSD_FileNode ( const OSD_Path Name)
protected

Instantiates the object FileNode storing its name. If a name is not found, it raises a program error.

OSD_FileNode::~OSD_FileNode ( )
inlineprotected

Destructor is protected for safer inheritance.

Member Function Documentation

Quantity_Date OSD_FileNode::AccessMoment ( )

Returns last write access. On UNIX, AccessMoment and CreationMoment return the same value.

void OSD_FileNode::Copy ( const OSD_Path ToPath)

Copies <me> to another FileNode.

Quantity_Date OSD_FileNode::CreationMoment ( )

Returns creation date. On UNIX, AccessMoment and CreationMoment return the same value.

Standard_Integer OSD_FileNode::Error ( ) const

Returns error number if 'Failed' is TRUE.

Standard_Boolean OSD_FileNode::Exists ( )

Returns TRUE if <me> exists.

Standard_Boolean OSD_FileNode::Failed ( ) const

Returns TRUE if an error occurs.

void OSD_FileNode::Move ( const OSD_Path NewPath)

Moves <me> into another directory.

void OSD_FileNode::Path ( OSD_Path Name) const

Gets file name and path.

void OSD_FileNode::Perror ( )

Raises OSD_Error.

OSD_Protection OSD_FileNode::Protection ( )

Returns access mode of <me>.

void OSD_FileNode::Remove ( )

Erases the FileNode from directory.

void OSD_FileNode::Reset ( )

Resets error counter to zero.

void OSD_FileNode::SetPath ( const OSD_Path Name)

Sets file name and path. If a name is not found, it raises a program error.

void OSD_FileNode::SetProtection ( const OSD_Protection Prot)

Changes protection of the FileNode.

Field Documentation

OSD_Error OSD_FileNode::myError
protected
OSD_Path OSD_FileNode::myPath
protected

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