[FreeRTOS+FAT Standard API Reference]
int ff_findnext( FF_FindData_t *pxFindData );
Finds the next file or directory within an embedded FAT file system directory. ff_findnext() can only be called after first calling ff_findfirst(). ff_findfirst() finds the first file in the directory, ff_findnext() then finds all subsequent files in the directory.
The same instance of the FF_FindData_t object must be passed into ff_findnext() as was passed into ff_findfirst().
FF_FindData_t contains the fields shown in the table below:
|pcFileName||The name of the file|
|ulFileSize||The length of the file in bytes|
The file’s attributes, which is a bitwise OR of the following
|pxFindData||A pointer to a structure that is used to store information required to scan a directory, and to pass out details of the files contained in the directory.|
If a file or directory was found then 0 is returned. If an error occurs a non-zero value is returned.