C
int FindFirst( const char * fileName, unsigned int attr, SearchRec * rec );
Description
The FindFirst function will search for a file based on parameters passed in by the user. This function will use the FILEfind function to parse through the current working directory searching for entries that match the specified parameters. If a file is found, its parameters are copied into the SearchRec structure, as are the initial parameters passed in by the user and the position of the file entry in the current working directory.
Preconditions
None
Parameters
Parameters |
Description |
fileName |
The name to search for
|
attr |
The attributes that a found file may have
|
rec |
pointer to a structure to put the file information in |
Return Values
Return Values |
Description |
0 |
File was found |
-1 |
No file matching the specified criteria was found |
Side Effects
Remarks
Call FindFirst or FindFirstpgm before calling FindNext