#include <revolution/nand.h>
#define NAND_MAX_NAME 12
typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );
s32 NANDReadDirAsync( const char *dirName, char *nameList, u32 *num, NANDCallback cb, NANDCommandBlock *block );
dirName |
Name of the directory to read from. |
nameList |
Start address of the buffer used for storing the list of file names and directory names contained in the directory that is read. This buffer must be aligned on a 32-byte address boundary. If set to NULL, the list is not stored in the buffer. |
num |
Stores the number of files and directories contained in the directory that is read. |
cb |
Specifies the callback function to call when this function completes processing. |
block |
Specifies the command block structure to pass to the callback function. |
Returns NAND_RESULT_OK when the request begins normally.
NAND_RESULT_OK
NAND_RESULT_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_INVALID
NAND_RESULT_NOEXISTS
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR
Asynchronously gets the list of file names and directory names contained in the directory that is read. If the list size is unknown, retrieve the list as follows:
NULL. The number of elements in the list is written to the location pointed to by num.
NAND_MAX_NAME+1)] or larger.
num (this value may be less than the value in the first call to this function), and the file and directory list with a null character separator is stored in the allocated memory.
If the queue receiving the request is full in the library, this function call is refused and NAND_RESULT_BUSY is returned.
06/16/2006 Initial version.