

#include <nitro/fs.h>
BOOL FS_OpenDirectory(FSFile *dir, const char *path, u32 mode);
BOOL FS_OpenDirectoryW(FSFile *file, const u16 *path, u32 mode);
| dir | FSFile structure where the handle should be stored. |
| path | Directory's path |
| mode | Specifies the combination of FS_DIRMODE_* flags that indicate the mode for accessing the directory. |
Returns TRUE if the directory handle opens properly; FALSE otherwise. In case of failure, use FS_GetResultCode() to get the error details.
Opens the handle for the specified directory.
You can use the FS_OpenDirectory function when the path is specified using Shift_JIS, and the FS_OpenDirectoryW function when the path is specified using UTF16-LE. The results that are obtained will be the same. You can list all entry information within a directory, one at a time, by calling FS_ReadDirectory() with the handle that is obtained. After using a handle, you must call FS_CloseDirectory() to free it. The function returns FALSE in the following situations:
FSFile FSDirectoryEntryInfo FSDirectoryEntryInfoW
FS_ReadDirectory FS_CloseDirectory
2008/09/02 Added notes concerning a Unicode version of the function.
2008/07/16 Revised the description to use FS_GetResultCode() for getting the error code in cases of failure.
2007/09/18 Initial version.
CONFIDENTIAL