fs::sys::fdr::DirLst_t Class Reference

#include <fsFileDir.h>

Collaboration diagram for fs::sys::fdr::DirLst_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

Directory list.

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).

Examples:

_tests/fsFileDir/main.cpp.

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_toperator= (const DirLst_t &)
 No assignment.

Private Attributes

void * m_pImpl
 The PIPML idiom is used.


Constructor & Destructor Documentation

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.

Parameters:
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 (  ) 

Definition at line 410 of file fsFileDir.cpp.

References FS_ASSERT_MSG, and m_pImpl.

fs::sys::fdr::DirLst_t::DirLst_t (  )  [private]

No def ctor.

fs::sys::fdr::DirLst_t::DirLst_t ( const DirLst_t  )  [private]

No copy.


Member Function Documentation

const char * DirLst_t::GetAt ( int  nIndex  )  const

Returns an item at the given position in the list.

Examples:
_tests/fsFileDir/main.cpp.

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.

Examples:
_tests/fsFileDir/main.cpp.

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.

DirLst_t& fs::sys::fdr::DirLst_t::operator= ( const DirLst_t  )  [private]

No assignment.


Member Data Documentation

void* fs::sys::fdr::DirLst_t::m_pImpl [private]

The PIPML idiom is used.

Definition at line 78 of file fsFileDir.h.


The documentation for this class was generated from the following files:

FipS' Code (Thu Feb 15 22:43:55 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]