Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::Directory Class Reference

Filesystem directory class. More...

#include <directory.h>

Inheritance diagram for os::Directory:

os::FSNode os::DirIterator List of all members.

Public Methods

 Directory ()
 Default contructor. More...

 Directory (const std::string &cPath, int nOpenMode=O_RDONLY)
 Construct a directory from a path. More...

 Directory (const Directory &cDir, const std::string &cName, int nOpenMode=O_RDONLY)
 Construct a directory from a path. More...

 Directory (const FileReference &cRef, int nOpenMode=O_RDONLY)
 Construct a directory from a path. More...

 Directory (const FSNode &cNode)
 Construct a directory from a path. More...

 Directory (const Directory &cDir)
 Copy constructor. More...

virtual ~Directory ()
virtual status_t FDChanged (int nNewFD, const struct::stat &sStat)
virtual status_t GetNextEntry (std::string *pcName)
virtual status_t GetNextEntry (FileReference *pcRef)
virtual status_t Rewind ()
status_t CreateFile (const std::string &cName, os::File *pcFile, int nAccessMode=S_IRWXU)
status_t CreateDirectory (const std::string &cName, os::Directory *pcDir, int nAccessMode=S_IRWXU)
status_t CreateSymlink (const std::string &cName, const std::string &cDestination, os::SymLink *pcLink)
status_t GetPath (std::string *pcPath) const
 Get the absolute path of the directory. More...


Detailed Description

Filesystem directory class.

Description:
This class let you iterate over the content of a directory.

Unlik other FSNode derivated classes it is possible to ask a os::Directory to retrieve it's own path.

See also:
FSNode
Author(s):
Kurt Skauen (kurt@atheos.cx)


Constructor & Destructor Documentation

Directory::Directory ( )
 

Default contructor.

Description:
Initiate the instance to a know but invalid state. The instance must be successfully initialized with one of the SetTo() members before it can be used.

Author(s):
Kurt Skauen (kurt@atheos.cx)

Directory::Directory ( const std::string & cPath,
int nOpenMode = O_RDONLY )
 

Construct a directory from a path.

Description:
See: SetTo( const std::string& cPath, int nOpenMode )
Author(s):
Kurt Skauen (kurt@atheos.cx)

Directory::Directory ( const Directory & cDir,
const std::string & cPath,
int nOpenMode = O_RDONLY )
 

Construct a directory from a path.

Description:
See: ( const Directory& cDir, const std::string& cPath, int nOpenMode )
Author(s):
Kurt Skauen (kurt@atheos.cx)

Directory::Directory ( const FileReference & cRef,
int nOpenMode = O_RDONLY )
 

Construct a directory from a path.

Description:
See: SetTo( const FileReference& cRef, int nOpenMode )
Author(s):
Kurt Skauen (kurt@atheos.cx)

Directory::Directory ( const FSNode & cNode )
 

Construct a directory from a path.

Description:
See: SetTo( const FSNode& cNode )
Author(s):
Kurt Skauen (kurt@atheos.cx)

Directory::Directory ( const Directory & cDir )
 

Copy constructor.

Description:
Make a independent copy of another directory.

The new directory will consume a new file descriptor so the copy might fail (throwing an errno_exception exception) if the process run out of file descriptors.
Parameters:
cDir   The directory to copy
Author(s):
Kurt Skauen (kurt@atheos.cx)

Directory::~Directory ( ) [virtual]
 


Member Function Documentation

status_t Directory::CreateDirectory ( const std::string & cName,
os::Directory * pcDir,
int nAccessMode = S_IRWXU )
 

status_t Directory::CreateFile ( const std::string & cName,
os::File * pcFile,
int nAccessMode = S_IRWXU )
 

status_t Directory::CreateSymlink ( const std::string & cName,
const std::string & cDestination,
os::SymLink * pcLink )
 

status_t Directory::FDChanged ( int nNewFD,
const struct::stat & sStat ) [virtual]
 

Reimplemented from os::FSNode.

status_t Directory::GetNextEntry ( FileReference * pcRef ) [virtual]
 

Reimplemented from os::DirIterator.

status_t Directory::GetNextEntry ( std::string * pcName ) [virtual]
 

Reimplemented from os::DirIterator.

status_t Directory::GetPath ( std::string * pcPath ) const
 

Get the absolute path of the directory.

Description:
Note:
Warning:
Parameters:
return  
Error codes:
See also:
Author(s):
Kurt Skauen (kurt@atheos.cx)

status_t Directory::Rewind ( ) [virtual]
 

Reimplemented from os::DirIterator.


The documentation for this class was generated from the following files:
Generated at Sat Apr 7 16:11:33 2001 for AtheOS higlevel API by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001