

#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 |
File's path. |
mode |
Specifies the 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 FS_GetResultCode() 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_CreateFile() must be used to create a new file.FS_RESULT_PEMISSION_DENIED if you try to open a file 2 GB or larger.FS_RESULT_PEMISSION_DENIED. (For more information on the specification of TWL-only files, see the explanation about the Put parameter in makerom.TWL.)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 FSDirectoryEntryInfo
FS_ReadFile FS_WriteFile FS_SeekFile
2009/01/08 Added an explanation about TWL-only 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