#include <dirs.h>

Inheritance diagram for DirUtil:

List of all members.

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

virtual void DirUtil::fileFound ( const CString path,
const CString file 
) [pure virtual]

Implemented in ListTests.

Referenced by find(), and findRecursive().

void DirUtil::find ( const CString path,
const CString pattern,
FileType  ft 
)

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

Here is the call graph for this function:

void DirUtil::findRecursive ( const CString path,
const CString pattern,
FileType  ft 
)

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

Here is the call graph for this function:

list< CString > * DirUtil::get_dirs ( const CString path  )  [private]

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

virtual void DirUtil::newDir ( const CString path,
const CString dir 
) [pure virtual]

Implemented in ListTests.

Referenced by findRecursive().


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