DirUtil Class Reference
#include <dirs.h>
Public Member Functions | |
void | find (const CString &path, const CString &pattern, FileType ft) |
void | findRecursive (const CString &path, const CString &pattern, FileType ft) |
virtual void | fileFound (const CString &path, const CString &file)=0 |
virtual void | newDir (const CString &path, const CString &dir)=0 |
Private Member Functions | |
list< CString > * | get_dirs (const CString &path) |
list< CString > * | get_files (const CString &path, const CString &pattern, FileType ft) |
Detailed Description
DirUtil utility class to traverse a directory tree
Member Function Documentation
Implemented in ListTests.
Referenced by find(), and findRecursive().
find all files of type ft that match pattern in directory path for every file found, the function fileFound() is invoked.
DirUtile::find find all entries of type ft that match pattern in path call fileFound for every result found
References fileFound(), and get_files().
find all files of type ft that match pattern in directory path or any of its subdirectories for every file found, the method fileFound() is invoked. for every directory searched, the method newDir() is invoked.
References fileFound(), get_dirs(), get_files(), newDir(), and PATHSEPARATOR.
Referenced by ListTests::ListTests().
get_dirs return a list of subdirectories of 'path'
References PATHSEPARATOR.
Referenced by findRecursive().
list< CString > * DirUtil::get_files | ( | const CString & | path, | |
const CString & | pattern, | |||
FileType | ft | |||
) | [private] |
DirUtil::get_files Return a list of all files matching 'pattern' in directory 'path' of type ft TODO: change name, get_files doe not only return files
References PATHSEPARATOR.
Referenced by find(), and findRecursive().
Implemented in ListTests.
Referenced by findRecursive().
The documentation for this class was generated from the following files: