Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
fs.h
Go to the documentation of this file.
1#ifndef _REVOLUTION_FS_H_
2#define _REVOLUTION_FS_H_
3
4#include <revolution/types.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#define ISFS_ERROR_OK 0
13#define ISFS_ERROR_INVALID -101
14#define ISFS_ERROR_ACCESS -102
15#define ISFS_ERROR_CORRUPT -103
16#define ISFS_ERROR_NOTREADY -104
17#define ISFS_ERROR_EXISTS -105
18#define ISFS_ERROR_NOEXISTS -106
19#define ISFS_ERROR_MAXFILES -107
20#define ISFS_ERROR_MAXBLOCKS -108
21#define ISFS_ERROR_MAXFD -109
22#define ISFS_ERROR_MAXDEPTH -110
23#define ISFS_ERROR_OPENFD -111
24#define ISFS_ERROR_BADBLOCK -112
25#define ISFS_ERROR_ECC -113
26#define ISFS_ERROR_ECC_CRIT -114
27#define ISFS_ERROR_NOTEMPTY -115
28#define ISFS_ERROR_HMAC -116
29#define ISFS_ERROR_UNKNOWN -117
30#define ISFS_ERROR_BUSY -118
31#define ISFS_ERROR_SHUTDOWN -119
32
33#define ISFS_INODE_NAMELEN 12
34
35typedef s32 ISFSError;
36typedef void (*ISFSCallback) (ISFSError, void *ctxt);
37
47
48typedef struct {
52
62
63typedef struct {
64 u8 path1[64];
65 u8 path2[64];
67
69s32 ISFS_CreateDir(const u8* dname, u32 dirAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc);
70s32 ISFS_CreateDirAsync(const u8* dname, u32 dirAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc, ISFSCallback cb, void* fsCtxt);
71s32 ISFS_ReadDir(const u8* dname, u8* nameList, u32* num);
72s32 ISFS_ReadDirAsync(const u8* dname, u8* nameList, u32* num, ISFSCallback cb, void* fsCtxt);
73s32 ISFS_GetAttr(const u8* name, IOSUid* ownerId, IOSGid* groupId, u32* attr, u32* ownerAcc, u32* groupAcc, u32* othersAcc);
74s32 ISFS_GetAttrAsync(const u8* name, IOSUid* ownerId, IOSGid* groupId, u32* attr, u32* ownerAcc, u32* groupAcc, u32* othersAcc, ISFSCallback cb, void* fsCtxt);
75s32 ISFS_Delete(const u8* name);
76s32 ISFS_DeleteAsync(const u8* name, ISFSCallback cb, void* fsCtxt);
77s32 ISFS_Rename(const u8* oldName, const u8* newName);
78s32 ISFS_RenameAsync(const u8* oldName, const u8* newName, ISFSCallback cb, void* fsCtxt);
79s32 ISFS_GetUsage(const u8* dname, u32* nblocks, u32* ninodes);
80s32 ISFS_CreateFile(const u8* fname, u32 fileAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc);
81s32 ISFS_CreateFileAsync(const u8* fname, u32 fileAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc, ISFSCallback cb, void* fsCtxt);
82IOSFd ISFS_Open(const u8* fname, u32 access);
83IOSFd ISFS_OpenAsync(const u8* fname, u32 access, ISFSCallback cb, void* fsCtxt);
86s32 ISFS_Seek(IOSFd fd, s32 offset, u32 whence);
87s32 ISFS_SeekAsync(IOSFd fd, s32 offset, u32 whence, ISFSCallback cb, void* fsCtxt);
88s32 ISFS_Read(s32 fd, u8* pBuffer, u32 bufSize);
89s32 ISFS_ReadAsync(IOSFd fd, u8* buf, u32 size, ISFSCallback cb, void* fsCtxt);
90s32 ISFS_Write(IOSFd fd, const u8* buf, u32 size);
91s32 ISFS_WriteAsync(IOSFd fd, const u8* buf, u32 size, ISFSCallback cb, void* fsCtxt);
93s32 ISFS_CloseAsync(IOSFd fd, ISFSCallback cb, void* fsCtxt);
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif // _REVOLUTION_FS_H_
s16 name
Definition d_a_e_pz.cpp:1754
static const Attr & attr()
Definition d_a_obj_ladder.cpp:39
unsigned int size
Definition __os.h:106
unsigned long u32
Definition types.h:12
signed long s32
Definition types.h:11
unsigned char u8
Definition types.h:8
s32 ISFS_DeleteAsync(const u8 *name, ISFSCallback cb, void *fsCtxt)
Definition fs.c:477
s32 ISFS_Read(s32 fd, u8 *pBuffer, u32 bufSize)
Definition fs.c:855
void(* ISFSCallback)(ISFSError, void *ctxt)
Definition fs.h:36
s32 ISFS_ReadAsync(IOSFd fd, u8 *buf, u32 size, ISFSCallback cb, void *fsCtxt)
Definition fs.c:868
s32 ISFS_Rename(const u8 *oldName, const u8 *newName)
Definition fs.c:503
s32 ISFS_GetAttrAsync(const u8 *name, IOSUid *ownerId, IOSGid *groupId, u32 *attr, u32 *ownerAcc, u32 *groupAcc, u32 *othersAcc, ISFSCallback cb, void *fsCtxt)
Definition fs.c:408
s32 ISFS_ShutdownAsync(ISFSCallback cb, void *fsCtxt)
Definition fs.c:955
s32 ISFSError
Definition fs.h:35
s32 ISFS_CreateDirAsync(const u8 *dname, u32 dirAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc, ISFSCallback cb, void *fsCtxt)
Definition fs.c:187
IOSFd ISFS_OpenAsync(const u8 *fname, u32 access, ISFSCallback cb, void *fsCtxt)
Definition fs.c:735
s32 ISFS_SeekAsync(IOSFd fd, s32 offset, u32 whence, ISFSCallback cb, void *fsCtxt)
Definition fs.c:836
s32 ISFS_WriteAsync(IOSFd fd, const u8 *buf, u32 size, ISFSCallback cb, void *fsCtxt)
Definition fs.c:905
s32 ISFS_Write(IOSFd fd, const u8 *buf, u32 size)
Definition fs.c:892
s32 ISFS_GetAttr(const u8 *name, IOSUid *ownerId, IOSGid *groupId, u32 *attr, u32 *ownerAcc, u32 *groupAcc, u32 *othersAcc)
Definition fs.c:343
s32 ISFS_CreateFileAsync(const u8 *fname, u32 fileAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc, ISFSCallback cb, void *fsCtxt)
Definition fs.c:673
s32 ISFS_GetFileStats(IOSFd fd, ISFSFileStats *stats)
Definition fs.c:772
s32 ISFS_RenameAsync(const u8 *oldName, const u8 *newName, ISFSCallback cb, void *fsCtxt)
Definition fs.c:537
s32 ISFS_ReadDirAsync(const u8 *dname, u8 *nameList, u32 *num, ISFSCallback cb, void *fsCtxt)
Definition fs.c:293
s32 ISFS_CloseAsync(IOSFd fd, ISFSCallback cb, void *fsCtxt)
Definition fs.c:935
ISFSError ISFS_OpenLib(void)
Definition fs.c:48
s32 ISFS_Delete(const u8 *name)
Definition fs.c:448
s32 ISFS_CreateDir(const u8 *dname, u32 dirAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc)
Definition fs.c:148
s32 ISFS_ReadDir(const u8 *dname, u8 *nameList, u32 *num)
Definition fs.c:220
s32 ISFS_Close(IOSFd fd)
Definition fs.c:929
IOSFd ISFS_Open(const u8 *fname, u32 access)
Definition fs.c:706
s32 ISFS_Seek(IOSFd fd, s32 offset, u32 whence)
Definition fs.c:830
s32 ISFS_GetUsage(const u8 *dname, u32 *nblocks, u32 *ninodes)
Definition fs.c:569
s32 ISFS_GetFileStatsAsync(IOSFd fd, ISFSFileStats *stats, ISFSCallback cb, void *fsCtxt)
Definition fs.c:805
s32 ISFS_CreateFile(const u8 *fname, u32 fileAttr, u32 ownerAcc, u32 groupAcc, u32 othersAcc)
Definition fs.c:638
static void cb(s32 result, DVDCommandBlock *block)
Definition fstload.c:16
u32 IOSUid
Definition iosrestypes.h:5
u16 IOSGid
Definition iosrestypes.h:6
s32 IOSFd
Definition iostypes.h:7
Definition fs.h:48
u32 size
Definition fs.h:49
u32 offset
Definition fs.h:50
Definition fs.h:53
u8 attr
Definition fs.h:60
u8 othersAccess
Definition fs.h:59
IOSUid ownerId
Definition fs.h:54
IOSGid groupId
Definition fs.h:55
u8 groupAccess
Definition fs.h:58
u8 ownerAccess
Definition fs.h:57
Definition fs.h:63
Definition fs.h:38
u32 blockSize
Definition fs.h:39
u32 reservedBlocks
Definition fs.h:43
u32 occupedInodes
Definition fs.h:45
u32 freeInodes
Definition fs.h:44
u32 freeBlocks
Definition fs.h:40
u32 occupiedBlcocks
Definition fs.h:41
u32 badBlocks
Definition fs.h:42
Definition d_a_npc_ks.cpp:47