#include <nitro/fs.h>
/* file and directory structure */
typedef struct FSFile
{
/* private: */
/* for archive control */
FSFileLink link;
struct FSArchive *arc;
/* for internal status */
u32 stat;
FSCommandType command;
FSResult error;
OSThreadQueue queue[4 / sizeof(OSThreadQueue)];
/* private: (except direct operation with FSArchive) */
/* handle property */
union {
/* file-handle property */
struct {
u32 own_id; /* own file-id */
u32 top; /* image-top */
u32 bottom; /* image-bottom */
u32 pos; /* current position */
} file;
/* directory-handle property */
struct {
FSDirPos pos; /* current-directory-position */
u32 parent; /* parent directory-id */
} dir;
} prop;
/* command argument and return value area */
union {
FSReadFileInfo readfile;
FSWriteFileInfo writefile;
FSSeekDirInfo seekdir;
FSReadDirInfo readdir;
FSFindPathInfo findpath;
FSGetPathInfo getpath;
FSOpenFileFastInfo openfilefast;
FSOpenFileDirectInfo openfiledirect;
FSCloseFileInfo closefile;
} 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.
This type of internal expression may change in future enhancements. Avoid programming that depends upon sizes and members in the current package.
FS_OpenFile, FS_OpenFileFast, FS_CloseFile, FS_GetLength, FS_ReadFile, FS_SeekFile, FS_SeekFileToBegin, FS_SeekFileToEnd, FS_FindDir, FS_ReadDir, FS_TellDir, FS_SeekDir, FS_RewindDir
11/02/2004 Corrected the structure definition to match the header file.
05/20/2004 Description changes due changes in FSFile
.
05/14/2004 Description changes due changes in FSFile
.
04/13/2004 Description changes due changes in FSFile
.
04/08/2004 Description changes due to the integration of FSDir
and FSFile
.
04/01/2004 Initial version.