MSDN says:
HANDLE WINAPI FindFirstFile( LPCTSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData );
lpFileName
The directory or pa
According to a post on the OSR ntfsd list from 2002, this is an intentional feature of NtQueryDirectoryFile
/ZwQueryDirectoryFile
via FsRtlIsNameInExpression
. <
and >
correspond to *
and ?
, but perform matching "using MS-DOS semantics".
The FsRtlIsNameInExpression states:
The following wildcard characters can be used in the pattern string.
Wildcard character Meaning
* (asterisk) Matches zero or more characters.
? (question mark) Matches a single character.
DOS_DOT Matches either a period or zero characters beyond the name
string.
DOS_QM Matches any single character or, upon encountering a period
or end of name string, advances the expression to the end of
the set of contiguous DOS_QMs.
DOS_STAR Matches zero or more characters until encountering and
matching the final . in the name.
For some reason, this page does not give the values of the DOS_*
macros, but ntifs.h
does:
// The following constants provide addition meta characters to fully
// support the more obscure aspects of DOS wild card processing.
#define DOS_STAR (L'<')
#define DOS_QM (L'>')
#define DOS_DOT (L'"')