#include <DirEnumerator.h>

Public Member Functions | |
| LPCTSTR | GetCurrentDirectory () const |
| LPCTSTR | GetDirectory () const |
| bool | IsRecursive () const |
| bool | Start (CFileFilter &filter) |
Protected Member Functions | |
| CDirEnumerator (LPCTSTR lpszDirectory, bool bRecursive=true) | |
| virtual void | EnterDirectory () |
| virtual void | ExitDirectory () |
| virtual void | OnEnumerationBegin () |
| virtual void | OnEnumerationEnd (bool bResult) |
| virtual bool | Process (LPCTSTR lpszPath, const CFileInfo &info)=0 |
A base class for processing multiple files in a directory. It provides a directory enumeration functionality.
Definition at line 46 of file DirEnumerator.h.
|
inlineprotected |
Initializes a new CDirEnumerator object.
| lpszDirectory | A directory to process. |
| bRecursive | The value indicating whether the subfolders of lpszDirectory should be processed recursively. |
Definition at line 68 of file DirEnumerator.h.
|
inlineprotectedvirtual |
This method is called when an enumeration process enters a new directory.
Definition at line 127 of file DirEnumerator.h.
|
inlineprotectedvirtual |
This method is called when an enumeration process exits a directory.
Definition at line 137 of file DirEnumerator.h.
|
inline |
Returns the directory being currently processed.
Definition at line 170 of file DirEnumerator.h.
|
inline |
Returns the directory being enumerated.
Definition at line 150 of file DirEnumerator.h.
|
inline |
Returns the value indicating whether the subfolders of the root directory are processed recursively.
true, if the enumeration process is recursive; false otherwise.Definition at line 162 of file DirEnumerator.h.
|
inlineprotectedvirtual |
This method is called at the beginning of the enumeration process.
Definition at line 105 of file DirEnumerator.h.
|
inlineprotectedvirtual |
This method is called at the end of the enumeration process.
| bResult | It is set to false, if the Process method returned false (the enumeration was aborted). Otherwise, it is set to true. |
Definition at line 117 of file DirEnumerator.h.
|
protectedpure virtual |
Override this method to perform file processing while enumerating directories. This method is not called for directories, but for files only.
| lpszPath | The full path to the current file. |
| info | A structure containing an information about the current file. |
true to continue the enumeration. When you return false, the enumeration is aborted.Implemented in CZipAddFilesEnumerator.
| bool ZipArchiveLib::CDirEnumerator::Start | ( | CFileFilter & | filter | ) |
Starts the enumeration process. Calls CFileFilter::Evaluate method for every file or directory found. If CFileFilter::Evaluate returns true, the file is processed by the Process method.
| filter | A filter that decides which directories and/or files should be processed and which should not. |
false, if the process was aborted (the Process method returned false); true otherwise.