#include <fsFileDir.h>
Collaboration diagram for fs::sys::fdr::DirLst_t:
Listed items are stored relatively to the given root directory path. For obtaining the full-path, it is necessary to combine GetRoot with a particular list item. If directories are listed as well, they are all stored at the beginning of the list (even if recursion is enabled). It is possible to distinguish between files and directories by looking at the last character of a particular item. A directory is indicated by the path separator (fs::sys::GetPathSpr).
Definition at line 54 of file fsFileDir.h.
Public Member Functions | |
DirLst_t (const char *pszFullDir, bool bRecur=false, bool bInclDirs=false, bool bInclFiles=true) | |
Fills the list with the content of the given directory. | |
~DirLst_t () | |
bool | IsValid () const |
Checks the internal state / correct construction. | |
const char * | GetRoot () const |
Returns a full directory path of the root. | |
int | GetNum () const |
Returns the number of items in the list. | |
const char * | GetAt (int nIndex) const |
Returns an item at the given position in the list. | |
Private Member Functions | |
DirLst_t () | |
No def ctor. | |
DirLst_t (const DirLst_t &) | |
No copy. | |
DirLst_t & | operator= (const DirLst_t &) |
No assignment. | |
Private Attributes | |
void * | m_pImpl |
The PIPML idiom is used. |
DirLst_t::DirLst_t | ( | const char * | pszFullDir, | |
bool | bRecur = false , |
|||
bool | bInclDirs = false , |
|||
bool | bInclFiles = true | |||
) | [explicit] |
Fills the list with the content of the given directory.
pszFullDir | A valid system dependent full directory path is expected, no internal checking is performed. | |
bRecur | Specifies whether subdirectories should be also traversed recursively. | |
bInclFiles | Specifies whether files should be also included in the list. | |
bInclDirs | Specifies whether directories should be also included in the list. |
Definition at line 403 of file fsFileDir.cpp.
References FS_ASSERT_MSG, and m_pImpl.
DirLst_t::~DirLst_t | ( | ) |
fs::sys::fdr::DirLst_t::DirLst_t | ( | ) | [private] |
No def ctor.
fs::sys::fdr::DirLst_t::DirLst_t | ( | const DirLst_t & | ) | [private] |
No copy.
const char * DirLst_t::GetAt | ( | int | nIndex | ) | const |
Returns an item at the given position in the list.
Definition at line 434 of file fsFileDir.cpp.
References FS_ASSERT_MSG, and m_pImpl.
int DirLst_t::GetNum | ( | ) | const |
Returns the number of items in the list.
Definition at line 428 of file fsFileDir.cpp.
References FS_ASSERT_MSG, and m_pImpl.
const char * DirLst_t::GetRoot | ( | ) | const |
Returns a full directory path of the root.
Definition at line 422 of file fsFileDir.cpp.
References FS_ASSERT_MSG, and m_pImpl.
bool DirLst_t::IsValid | ( | ) | const |
Checks the internal state / correct construction.
Definition at line 416 of file fsFileDir.cpp.
References FS_ASSERT_MSG, and m_pImpl.
void* fs::sys::fdr::DirLst_t::m_pImpl [private] |