#include <directory.h>

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 |
| enum Directory::EntryType |
| Directory::Directory | ( | ) | [protected] |
Constructor. It is private because only FileServer may create objects.
| Directory::~Directory | ( | ) | [protected, virtual] |
Destructor.
| bool Directory::Open | ( | const string & | path | ) |
Opens the specified directory.
| path | The name of the directory to open. |
| 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.
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.
| type | Entry type to test. |
True if given type is same as entry type. | bool Directory::SetFirstEntry | ( | ) | [protected] |
Sets search index to first entry in directory.
friend class FileServer [friend] |
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] |
1.5.3