FindNext Function

MDD File System Interface Library

MDDFS Interface Library Help
FindNext Function
C
int FindNext(
    SearchRec * rec
);
Description

The FindNext function performs the same function as the FindFirst funciton, except it does not copy any search parameters into the SearchRec structure (only info about found files) and it begins searching at the last directory entry offset at which a file was found, rather than at the beginning of the current working directory.If the return value of the function is 0 then "utf16LFNfoundLength" indicates whether the file found was long file name or short file name(8P3 format). The "utf16LFNfoundLength" is non-zero for long file name and is zero for 8P3 format."utf16LFNfound" points to the address of long file name if found during the operation.

Preconditions

None

Parameters
Parameters 
Description 
rec 
The structure to store the file information in 
Return Values
Return Values 
Description 
File was found 
-1 
No additional files matching the specified criteria were found 
Side Effects

Search criteria from previous FindNext call on passed SearchRec object will be lost. "utf16LFNfound" is overwritten after subsequent FindFirst/FindNext operations.It is the responsibility of the application to read the "utf16LFNfound" before it is lost.The FSerrno variable will be changed.

Remarks

Call FindFirst or FindFirstpgm before calling this function

Microchip MDD File System Interface 1.4.2 - [Oct 15, 2012]
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.