NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
fs.h
1#ifndef RVL_SDK_FS_H
2#define RVL_SDK_FS_H
3#include <revolution/IPC.h>
4#include <types.h>
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#define FS_MAX_PATH 64
10
11typedef void (*FSAsyncCallback)(s32 result, void* arg);
12
13typedef struct FSStats {
14 char UNK_0x0[0x1C];
15} FSStats;
16
17// Could be more fields, but not larger than 32B
18typedef struct FSFileStats {
19 u32 length; // at 0x0
20 u32 position; // at 0x4
21} FSFileStats ALIGN(32);
22
23s32 ISFS_OpenLib(void);
24s32 ISFS_CreateDir(const char* path, u32 attr, u32 ownerPerm, u32 groupPerm,
25 u32 otherPerm);
26s32 ISFS_CreateDirAsync(const char* path, u32 attr, u32 ownerPerm,
27 u32 groupPerm, u32 otherPerm, FSAsyncCallback callback,
28 void* callbackArg);
29s32 ISFS_ReadDir(const char* path, char* filesOut, u32* fileCountOut);
30s32 ISFS_ReadDirAsync(const char* path, char* filesOut, u32* fileCountOut,
31 FSAsyncCallback callback, void* callbackArg);
32s32 ISFS_GetAttr(const char* path, u32* ownerIdOut, u16* groupIdOut,
33 u32* attrOut, u32* ownerPermOut, u32* groupPermOut,
34 u32* otherPermOut);
35s32 ISFS_GetAttrAsync(const char* path, u32* ownerIdOut, u16* groupIdOut,
36 u32* attrOut, u32* ownerPermOut, u32* groupPermOut,
37 u32* otherPermOut, FSAsyncCallback callback,
38 void* callbackArg);
39s32 ISFS_Delete(const char* path);
40s32 ISFS_DeleteAsync(const char* path, FSAsyncCallback callback,
41 void* callbackArg);
42s32 ISFS_Rename(const char* from, const char* to);
43s32 ISFS_RenameAsync(const char* from, const char* to, FSAsyncCallback callback,
44 void* callbackArg);
45s32 ISFS_GetUsage(const char* path, s32* blockCountOut, s32* fileCountOut);
46s32 ISFS_CreateFile(const char* path, u32 attr, u32 ownerPerm, u32 groupPerm,
47 u32 otherPerm);
48s32 ISFS_CreateFileAsync(const char* path, u32 attr, u32 ownerPerm,
49 u32 groupPerm, u32 otherPerm, FSAsyncCallback callback,
50 void* callbackArg);
51s32 ISFS_Open(const char* path, IPCOpenMode mode);
52s32 ISFS_OpenAsync(const char* path, IPCOpenMode mode, FSAsyncCallback callback,
53 void* callbackArg);
54s32 ISFS_GetFileStats(s32 fd, FSFileStats* statsOut);
55s32 ISFS_GetFileStatsAsync(s32 fd, FSFileStats* statsOut,
56 FSAsyncCallback callback, void* callbackArg);
57s32 ISFS_Seek(s32 fd, s32 offset, IPCSeekMode mode);
58s32 ISFS_SeekAsync(s32 fd, s32 offset, IPCSeekMode mode,
59 FSAsyncCallback callback, void* callbackArg);
60s32 ISFS_Read(s32 fd, void* dst, s32 len);
61s32 ISFS_ReadAsync(s32 fd, void* dst, s32 len, FSAsyncCallback callback,
62 void* callbackArg);
63s32 ISFS_Write(s32 fd, const void* src, s32 len);
64s32 ISFS_WriteAsync(s32 fd, const void* src, s32 len, FSAsyncCallback callback,
65 void* callbackArg);
66s32 ISFS_Close(s32 fd);
67s32 ISFS_CloseAsync(s32 fd, FSAsyncCallback callback, void* callbackArg);
68s32 ISFS_ShutdownAsync(FSAsyncCallback callback, void* callbackArg);
69
70#ifdef __cplusplus
71}
72#endif
73#endif
Definition fs.h:13