virtual BOOL MatchesMask( DWORD dwMask ) const;
Return Value
Nonzero if successful; otherwise 0. To get extended error information, call the Win32 function GetLastError.
Parameters
dwMask
Specifies one or more file attributes, identified in the WIN32_FIND_DATA structure, for the found file. To search for multiple attributes, use the bitwise OR (|) operator. Any combination of the following attributes is acceptable:
Remarks
Call this member function to test the file attributes on the found file.
Example
// This code fragment shows all of the files in the root directory
// of drive C: which have either the hidden attribute or the system
// attribute, or both.
CFileFind finder;
BOOL bWorking = finder.FindFile(_T("C:\\*.*"));
while (bWorking)
{
bWorking = finder.FindNextFile();
if (finder.MatchesMask(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
_tprintf(_T("%s\n"), (LPCTSTR) finder.GetFileName());
}
CFileFind Overview | Class Members | Hierarchy Chart
See Also CFileFind::IsDots, CFileFind::IsReadOnly, CFileFind::IsDirectory, CFileFind::IsCompressed, CFileFind::IsSystem, CFileFind::IsHidden, CFileFind::IsTemporary, CFileFind::IsNormal, CFileFind::IsArchived