INtime SDK Help
FindFirstRtFile
INtime SDK v6 > About INtime > INtime Kernel > Files > FindFirstRtFile

Searches a directory for a file or subdirectory with a name and attributes that match those specified.

BOOLEAN FindFirstRtFile(
        LPSTR lpFileName, 
        LPFIND_FILE_DATA  lpFindData,
        DWORD dwFlags);

Parameters

lpFileName
A string containing a filename to search for, which can include wildcards such as asterisk (‘*’) or question mark (‘?’). The name is limited to MAX_PATH characters. The string must not terminate with a directory delimiter.
lpFindData
A pointer to a FIND_FILE_DATA structure which receives the file data.
dwFlags
Reserved for future use. Must be set to zero.

Remarks

The function returns information about the first file that the file system finds with a name that matches the specified pattern. This may or may not be the first file or directory that appears in a directory-listing application when given the same file name string pattern. This is because the function does no sorting of the search results.

The search is performed strictly on the name of the file, not on any attributes such as a date or a file type.

An attempt to start a search with a trailing directory delimiter (‘/’ or ‘\’) always fails.

Return codes

Returns TRUE on success. On failure returns FALSE and the extended error status may be obtained by calling GetLastRtError.

Requirements

Versions Defined in Include Link to
INtime 6.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also