|
EvEmu
0.8.4
11 September 2021
|
Simple class for directory listing. More...
#include "DirWalker.h"

Public Member Functions | |
| DirWalker () | |
| ~DirWalker () | |
| const char * | currentFileName () |
| bool | OpenDir (const char *dir, const char *suffix="") |
| Opens directory for listing. More... | |
| void | CloseDir () |
| Closes opened directory. More... | |
| bool | NextFile () |
| Iterates over to next file in directory. More... | |
Protected Attributes | |
| DIR * | mDir |
| struct dirent * | mFile |
| std::string | mSuffix |
Simple class for directory listing.
Definition at line 38 of file DirWalker.h.
| DirWalker::DirWalker | ( | ) |
Definition at line 30 of file DirWalker.cpp.
| DirWalker::~DirWalker | ( | ) |
Definition at line 44 of file DirWalker.cpp.
References CloseDir().

| void DirWalker::CloseDir | ( | ) |
Closes opened directory.
Definition at line 84 of file DirWalker.cpp.
References mDir, mFile, and mSuffix.
Referenced by OpenDir(), and ~DirWalker().

| const char * DirWalker::currentFileName | ( | ) |
Definition at line 49 of file DirWalker.cpp.
References mFile.
Referenced by NextFile().

| bool DirWalker::NextFile | ( | ) |
Iterates over to next file in directory.
| true | Iteration successful. |
| false | Iteration failed; most likely there are no more files. |
Definition at line 101 of file DirWalker.cpp.
References currentFileName(), mDir, mFile, and mSuffix.

| bool DirWalker::OpenDir | ( | const char * | dir, |
| const char * | suffix = "" |
||
| ) |
Opens directory for listing.
| [in] | dir | Path to directory; must NOT end with backslash. |
| [in] | suffix | Only files with this suffix are matched. |
| true | Directory opened successfully. |
Definition at line 58 of file DirWalker.cpp.
References CloseDir(), mDir, mFile, and mSuffix.

|
protected |
Definition at line 80 of file DirWalker.h.
Referenced by CloseDir(), NextFile(), and OpenDir().
|
protected |
Definition at line 81 of file DirWalker.h.
Referenced by CloseDir(), currentFileName(), NextFile(), and OpenDir().
|
protected |
Definition at line 82 of file DirWalker.h.
Referenced by CloseDir(), NextFile(), and OpenDir().