#include <nitro/fs.h>
/* file and directory structure */
typedef struct FSFile
{
// private:
struct FSFile *next;
void *userdata;
struct FSArchive *arc;
u32 stat;
void *argument;
FSResult error;
OSThreadQueue queue[1];
union
{
u8 reserved1[16];
FSROMFATProperty prop;
};
union
{
u8 reserved2[24];
FSROMFATCommandInfo arg;
};
} FSFile;
This structure is used by file and directory access functions.
All members are used only in internal processing. Direct operation of these is prohibited.
// Example: The behavior of file2 is not guaranteed when it has been copied in this way.
FSFile file1, file2;
FS_InitFile(&file1);
FS_OpenFileEx(&file1, "rom/file1.bin", FS_FILEMODE_R);
file2 = file1;
FS_OpenFileEx
FS_OpenFileFast
FS_CloseFile
FS_GetFileLength
FS_ReadFile
FS_SeekFile
FS_SeekFileToBegin
FS_SeekFileToEnd
FS_FindDir
FS_ReadDir
FS_TellDir
FS_SeekDir
FS_RewindDir
2009/07/14 Added mention that copying structure values was not guaranteed.
2009/01/14 Corrected structure definition to match the header file.
2008/10/02 Updated part of See Also.
2004/11/02 Corrected structure definition to match the header file.
2004/05/20 Revised description due to changes in FSFile
.
2004/05/14 Revised description due to changes in FSFile
.
2004/04/13 Revised description due to changes in FSFile
.
2004/04/08 Revised Description due to the integration of FSDir
and FSFile
.
2004/04/01Initial version.
CONFIDENTIAL