#include <FileFilter.h>
Public Types | |
enum | AppliesToTypes { toFile = 0x1, toDirectory = 0x2, toAll = toFile | toDirectory } |
Public Member Functions | |
bool | AppliesToType (int iType) |
CNameFileFilter (LPCTSTR lpszPattern=_T("*"), bool bInverted=false, int iAppliesToTypes=toFile, bool bCaseSensitive=ZipPlatform::GetSystemCaseSensitivity()) | |
int | GetAppliesToTypes () |
bool | HandlesFile (const CFileInfo &info) |
void | SetAppliesToTypes (int iType) |
![]() | |
CFileFilter (bool bInverted=false) | |
bool | Evaluate (LPCTSTR lpszParentDir, LPCTSTR lpszName, const CFileInfo &info) |
bool | IsInverted () const |
void | SetInverted (bool bInverted=true) |
Protected Member Functions | |
virtual bool | Accept (LPCTSTR, LPCTSTR lpszName, const CFileInfo &info) |
![]() | |
virtual bool | HandlesInversion () const |
Additional Inherited Members | |
![]() | |
bool | m_bInverted |
A filter that allows filtering files by a filename mask while an enumeration process.
Definition at line 255 of file FileFilter.h.
The file type to which the CNameFileFilter filter can be applied. You can use the logical OR
to combine them.
toFile |
Regular files only. |
toDirectory |
Directories only. |
toAll |
Both regular files and directories. |
Definition at line 270 of file FileFilter.h.
|
inline |
Initializes a new instance of the CNameFileFilter class.
lpszPattern | A mask to match against a filename. This filter uses the CWildcard functionality for this purpose. |
iAppliesToTypes | The file type to which this filter applies. It an be one or more of the AppliesToTypes values. |
bInverted | Set to true to invert the behavior of the filter or to false for the normal behavior. |
bCaseSensitive | true , if the matching process is case-sensitive; false otherwise. By default, a system case-sensitivity setting is used. |
Definition at line 306 of file FileFilter.h.
|
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.
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. |
true
, if the file is accepted; false
otherwise.Reimplemented from ZipArchiveLib::CFileFilter.
Definition at line 379 of file FileFilter.h.
|
inline |
Returns the value indicating whether the filter can be applied to the given iType type.
iType | It can be one or more of the AppliesToTypes values. |
true
, if the filter can be applied to iType type; false
otherwise.Definition at line 326 of file FileFilter.h.
|
inline |
Returns the file type to which this filter applies.
Definition at line 352 of file FileFilter.h.
|
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.
false
from this method for the directory that should be traversed, but not added.info | The structure containing the information about the file. |
true
, if the info file will be evaluated by the Evaluate method; false
otherwise.Reimplemented from ZipArchiveLib::CFileFilter.
Definition at line 374 of file FileFilter.h.
|
inline |
Sets the file type to which this filter applies.
iType | The file type to which this filter applies. It can be one or more of the AppliesToTypes values. |
Definition at line 341 of file FileFilter.h.