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

P::Directory Class Reference
[Core library]

Directory stream class. More...

#include <pdirectory.h>

List of all members.

Public Member Functions

 Directory (const char *path) throw (IOError)
 Constructs a directory stream.

 ~Directory () throw ()
const std::string & path () const throw ()
 Get the path of the directory stream.

const char * operator++ () throw (IOError)
 Get next entry from directory stream.

const char * operator * () const throw ()
 Get current entry from directory stream.

void rewind () throw ()
 Rewind the directory stream to the beginning.


Static Public Member Functions

void create (const char *path) throw (IOError)
 Create the given directory.

void remove (const char *path) throw (IOError)
 Remove (unlink) the given directory.

std::string current () throw (IOError)
 Get the current working directory.

void change (const char *path) throw (IOError)
 Change the current working directory.

std::string separator () throw ()
 Returns the systems directory separator.

std::string homeDir () throw ()
 Returns path to the home directory.

void getDriveList (std::list< std::string > &dl) throw ()
 Returns a list of drive letters.


Detailed Description

Directory stream class.

This class can be used to enumerate the contents of a directory. It also provides some static methods to create or remove directories as well as for changing and retrieven the current directory.

Todo:
check win32 behaviour of Directory-ctor
Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 40 of file pdirectory.h.


Constructor & Destructor Documentation

P::Directory::Directory const char *  path  )  throw (IOError)
 

Constructs a directory stream.

Constructs a directory stream object for the given path. If the directory does not exist or is not readable a IOError will be thrown.

Parameters:
path the path of the directory to enumerate
Exceptions:
IOError 

P::Directory::~Directory  )  throw ()
 


Member Function Documentation

void P::Directory::change const char *  path  )  throw (IOError) [static]
 

Change the current working directory.

void P::Directory::create const char *  path  )  throw (IOError) [static]
 

Create the given directory.

std::string P::Directory::current  )  throw (IOError) [static]
 

Get the current working directory.

void P::Directory::getDriveList std::list< std::string > &  dl  )  throw () [static]
 

Returns a list of drive letters.

std::string P::Directory::homeDir  )  throw () [static]
 

Returns path to the home directory.

const char* P::Directory::operator *  )  const throw ()
 

Get current entry from directory stream.

const char* P::Directory::operator++  )  throw (IOError)
 

Get next entry from directory stream.

const std::string& P::Directory::path  )  const throw () [inline]
 

Get the path of the directory stream.

Definition at line 54 of file pdirectory.h.

void P::Directory::remove const char *  path  )  throw (IOError) [static]
 

Remove (unlink) the given directory.

void P::Directory::rewind  )  throw ()
 

Rewind the directory stream to the beginning.

std::string P::Directory::separator  )  throw () [static]
 

Returns the systems directory separator.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:33 2004 for P::Classes by doxygen 1.3.3