| aDirectory_List | Index |
Definition:
| aLIBRETURN aDirectory_List( | aIOLib ioRef, aFileArea eArea, const char* pExtension, aDirectoryListProc listProc, void* vpRef, aErr* pErr); |
Parameters:
| ioRef | - | A pointer to the opaque library reference used to close the file. |
| eArea | - | A aFileArea location of the directory to be listed. |
| pExtension | - | A string that is used to match file extensions to select only a subset of files. |
| listProc | - | A callback routine that allows the user to perform any desired action for each file found in the directory. |
| vpRef | - | A pointer to user data that is passed to the listProc callback each time it is called. |
| pErr | - | A pointer to an aErr variable that receives the error code on exit from this routine. If a null pointer is passed, the error is not set. |
Return Value:
Description:
This routine searches the specified file area for files of the given extension. For each file found, the callback is called with the name of the file, the size of the file, and the user data as parameters to the callback. The extension must be specified. If the extension is an empty string, all files in the file area specified will be returned.
If the callback returns an error other than aErrNone, the listing of the directory stops and this callback error is set as the exit value for this routine.
Related: