#include <nitro/fs.h>
BOOL FS_OpenFileEx(FSFile *file, const char *path, u32 mode);
BOOL FS_OpenFileExW(FSFile *file, const u16 *path, u32 mode);
file | FSFile structure where the handle should be stored. |
path | Path name of file. |
mode | Combination of FS_FILEMODE_* flags that indicate the mode for accessing the file. |
TRUE
if the file 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 file.
You can use the FS_OpenFileEx
function when the path is specified using Shift_JIS
and the FS_OpenFileExW
function when the path is specified using UTF16-LE
. The results that are obtained will be the same. There are several conditions that apply to files that can be opened.
FS_FILEMODE_W
specified.FS_CreateFile
must be used to create a new file.FS_RESULT_PERMISSION_DENIED
if you try to open a file 2 GB or larger.FS_RESULT_PERMISSION_DENIED
.The various functions for file access can be called using the handle that is obtained. After using a handle, you must call FS_CloseFile
to free it.
FSFile
structure.FSFile
FSDirectoryEntryInfo
FS_ReadFile
FS_WriteFile
FS_SeekFile
2009/07/14 Added mention that copying structure values is not guaranteed.
2009/06/08 Added link to TWL-specific file explanation.
2009/01/08 Added an explanation about TWL-exclusive files.
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. Added size restriction of 2 GB.
2008/06/10 Added the fact that files will not be created automatically.
2007/09/18 Initial version.
CONFIDENTIAL