Directory Class Reference
[Kernel Module]

#include <directory.h>

Inheritance diagram for Directory:

Counted

List of all members.


Detailed Description

Wrapper for directory functions.

Provides functions for searching directories.

Public Types

enum  EntryType { ET_INVALID, ET_FILE, ET_DIRECTORY }

Public Member Functions

bool Open (const string &path)
void Close ()
bool IsOpened () const
const string & GetPathName () const
bool IsEmpty ()
bool SetNextEntry ()
const string & GetEntryName ()
EntryType GetEntryType ()
bool TestEntryType (EntryType type)

Protected Member Functions

 Directory ()
virtual ~Directory ()
bool SetFirstEntry ()

Protected Attributes

bool empty
bool opened
string path
string entry_name
DIR * dir
struct dirent * entry

Friends

class FileServer


Member Enumeration Documentation

enum Directory::EntryType

Enumerator:
ET_INVALID 
ET_FILE 
ET_DIRECTORY 


Constructor & Destructor Documentation

Directory::Directory (  )  [protected]

Constructor. It is private because only FileServer may create objects.

Directory::~Directory (  )  [protected, virtual]

Destructor.


Member Function Documentation

bool Directory::Open ( const string &  path  ) 

Opens the specified directory.

Parameters:
path The name of the directory to open.
Returns:
Success.

void Directory::Close (  ) 

Closes the directory.

bool Directory::IsOpened (  )  const [inline]

Determines whether the directory is open.

const string & Directory::GetPathName (  )  const [inline]

Gets the full path name of the directory itself.

bool Directory::IsEmpty (  ) 

Checks if the directory is empty.

Returns:
True if empty.

bool Directory::SetNextEntry (  ) 

const string& Directory::GetEntryName (  ) 

EntryType Directory::GetEntryType (  ) 

bool Directory::TestEntryType ( EntryType  type  )  [inline]

Returns whether given type is the same as current entry type.

Parameters:
type Entry type to test.
Returns:
True if given type is same as entry type.

bool Directory::SetFirstEntry (  )  [protected]

Sets search index to first entry in directory.

Returns:
Success.


Friends And Related Function Documentation

friend class FileServer [friend]


Member Data Documentation

bool Directory::empty [protected]

bool Directory::opened [protected]

string Directory::path [protected]

string Directory::entry_name [protected]

DIR* Directory::dir [protected]

struct dirent* Directory::entry [read, protected]


The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:31 2007 for Dark Oberon by  doxygen 1.5.3