#include <FileFilter.h>
A filter that allows filtering files by a filename mask while an enumeration process.
- See Also
- Compressing Data
-
Searching in Archive
-
CDirEnumerator::Start
The file type to which the CNameFileFilter filter can be applied. You can use the logical OR
to combine them.
- See Also
- SetAppliesToTypes
-
GetAppliesToTypes
- Enumerator:
toFile |
Regular files only.
|
toDirectory |
Directories only.
|
toAll |
Both regular files and directories.
|
virtual bool ZipArchiveLib::CNameFileFilter::Accept |
( |
LPCTSTR |
lpszParentDir, |
|
|
LPCTSTR |
lpszName, |
|
|
const CFileInfo & |
info |
|
) |
| |
|
inlineprotectedvirtual |
This method is directly called by the Evaluate method during an enumeration process.
If this method returns true
, the file will later be processed by the CDirEnumerator::Process method. If this method returns false
for a directory, the directory is not enumerated at all.
The meaning of the return value can be reversed by the SetInverted method. If this filter handles the inversion internally, the return value from this method is not reversed by the Evaluate method.
- Parameters
-
lpszParentDir | The parent directory containing the file to accept. |
lpszName | The name of the file to accept (without a path). |
info | The structure containing the information about the current file. |
- Returns
true
, if the file is accepted; false
otherwise.
- See Also
- Evaluate
-
HandlesInversion
-
CDirEnumerator::Start
-
CDirEnumerator::Process
Reimplemented from ZipArchiveLib::CFileFilter.
bool ZipArchiveLib::CNameFileFilter::AppliesToType |
( |
int |
iType | ) |
|
|
inline |
Returns the value indicating whether the filter can be applied to the given iType type.
- Parameters
-
- Returns
true
, if the filter can be applied to iType type; false
otherwise.
- See Also
- SetAppliesToTypes
-
GetAppliesToTypes
int ZipArchiveLib::CNameFileFilter::GetAppliesToTypes |
( |
| ) |
|
|
inline |
Returns the file type to which this filter applies.
- Returns
- The file type to which this filter applies. It can be one or more of the AppliesToTypes values.
- See Also
- SetAppliesToTypes
bool ZipArchiveLib::CNameFileFilter::HandlesFile |
( |
const CFileInfo & |
info | ) |
|
|
inlinevirtual |
Returns the value indicating whether the filter can decide about processing of the info file. The CNameFileFilter returns the value depending on the GetAppliesToTypes value.
- Note
- To keep traversing directories without adding some of them to the archive, return
false
from this method for the directory that should be traversed, but not added.
- Parameters
-
info | The structure containing the information about the file. |
- Returns
true
, if the info file will be evaluated by the Evaluate method; false
otherwise.
- See Also
- GetAppliesToTypes
-
SetAppliesToTypes
Reimplemented from ZipArchiveLib::CFileFilter.
void ZipArchiveLib::CNameFileFilter::SetAppliesToTypes |
( |
int |
iType | ) |
|
|
inline |
Sets the file type to which this filter applies.
- Parameters
-
iType | The file type to which this filter applies. It can be one or more of the AppliesToTypes values. |
- See Also
- GetAppliesToTypes
The documentation for this class was generated from the following file: