# FoundationClasses
TKernel
OSD

# OSD_FileNode Class Reference

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

`#include <OSD_FileNode.hxx>`

Inheritance diagram for OSD_FileNode:

[legend]

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT void | Path (OSD_Path &Name) const
| Gets file name and path. .
Standard_EXPORT void | SetPath (const OSD_Path &Name)
| Sets file name and path. If a name is not found, it raises a program error. .
Standard_EXPORT Standard_Boolean | Exists ()
| Returns TRUE if <me> exists. .
Standard_EXPORT void | Remove ()
| Erases the FileNode from directory .
Standard_EXPORT void | Move (const OSD_Path &NewPath)
| Moves <me> into another directory .
Standard_EXPORT void | Copy (const OSD_Path &ToPath)
| Copies <me> to another FileNode .
Standard_EXPORT OSD_Protection | Protection ()
| Returns access mode of <me>. .
Standard_EXPORT void | SetProtection (const OSD_Protection &Prot)
| Changes protection of the FileNode .
Standard_EXPORT Quantity_Date | AccessMoment ()
| Returns last write access. On UNIX, AccessMoment and CreationMoment return the same value. .
Standard_EXPORT Quantity_Date | CreationMoment ()
| Returns creation date. On UNIX, AccessMoment and CreationMoment return the same value. .
Standard_EXPORT Standard_Integer | UserId ()
| Returns User Identification. .
Standard_EXPORT Standard_Integer | GroupId ()
| Returns Group Identification. .
Standard_EXPORT Standard_Boolean | Failed () const
| Returns TRUE if an error occurs .
Standard_EXPORT void | Reset ()
| Resets error counter to zero .
Standard_EXPORT void | Perror ()
| Raises OSD_Error .
Standard_EXPORT Standard_Integer | Error () const
| Returns error number if 'Failed' is TRUE. .

## Protected Member Functions

Standard_EXPORT | 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. .
Standard_EXPORT | OSD_FileNode (const OSD_Path &Name)
| Instantiates the object FileNode storing its name. If a name is not found, it raises a program error. .

## Protected Attributes

OSD_Path | myPath
Standard_Integer | myFileChannel
OSD_Error | myError

## Constructor & Destructor Documentation

Standard_EXPORT OSD_FileNode::OSD_FileNode | ( |  | ) | `[protected]`

Standard_EXPORT OSD_FileNode::OSD_FileNode | ( | const OSD_Path & | Name | ) | `[protected]`

## Member Function Documentation

Standard_EXPORT Quantity_Date OSD_FileNode::AccessMoment | ( |  | ) |

Standard_EXPORT void OSD_FileNode::Copy | ( | const OSD_Path & | ToPath | ) |

Standard_EXPORT Quantity_Date OSD_FileNode::CreationMoment | ( |  | ) |

Standard_EXPORT Standard_Integer OSD_FileNode::Error | ( |  | ) | const

Standard_EXPORT Standard_Boolean OSD_FileNode::Exists | ( |  | ) |

Standard_EXPORT Standard_Boolean OSD_FileNode::Failed | ( |  | ) | const

Standard_EXPORT Standard_Integer OSD_FileNode::GroupId | ( |  | ) |

Standard_EXPORT void OSD_FileNode::Move | ( | const OSD_Path & | NewPath | ) |

void OSD_FileNode::operator delete | ( | void * | anAddress | ) | `[inline]`

| Reimplemented in OSD_Directory, and OSD_File.

void* OSD_FileNode::operator new | ( | size_t | size | ) | `[inline]`

| Reimplemented in OSD_Directory, and OSD_File.

void* OSD_FileNode::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

| Reimplemented in OSD_Directory, and OSD_File.

Standard_EXPORT void OSD_FileNode::Path | ( | OSD_Path & | Name | ) | const

Standard_EXPORT void OSD_FileNode::Perror | ( |  | ) |

Standard_EXPORT OSD_Protection OSD_FileNode::Protection | ( |  | ) |

Standard_EXPORT void OSD_FileNode::Remove | ( |  | ) |

Standard_EXPORT void OSD_FileNode::Reset | ( |  | ) |

Standard_EXPORT void OSD_FileNode::SetPath | ( | const OSD_Path & | Name | ) |

Standard_EXPORT void OSD_FileNode::SetProtection | ( | const OSD_Protection & | Prot | ) |

Standard_EXPORT Standard_Integer OSD_FileNode::UserId | ( |  | ) |

## Field Documentation

OSD_Error OSD_FileNode::myError `[protected]`

Standard_Integer OSD_FileNode::myFileChannel `[protected]`

OSD_Path OSD_FileNode::myPath `[protected]`

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

- OSD_FileNode.hxx