#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 is stored |
path | Directory's path |
mode | Combination of FS_DIRMODE_* flags that indicates the mode for accessing the directory |
TRUE
if the directory handle opens properly; FALSE
otherwise. In case of failure, use the FS_GetResultCode
function 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 in a directory, one at a time, by calling the FS_ReadDirectory
function with the handle that is obtained. After using a handle, you must call the FS_CloseDirectory
function to free it.
The function fails and returns FALSE
in the following situations:
FSFile
structure.FSFile
FSDirectoryEntryInfo
FSDirectoryEntryInfoW
FS_ReadDirectory
FS_CloseDirectory
2009/07/29 Added mention that copying structure values is not guaranteed.
2008/09/02 Added notes concerning a Unicode version of the function.
2008/07/16 Revised Description to use FS_GetResultCode
for getting the error code in cases of failure.
2007/09/18 Initial version.
CONFIDENTIAL