RetroArch
fs.h
Go to the documentation of this file.
1 #pragma once
2 #include <wiiu/types.h>
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
11 
12 typedef enum FSStatus
13 {
33 } FSStatus;
34 
35 typedef enum FSError
36 {
37  FS_ERROR_NOT_INIT = -0x30001,
38  FS_ERROR_BUSY = -0x30002,
39  FS_ERROR_CANCELLED = -0x30003,
40  FS_ERROR_END_OF_DIR = -0x30004,
45  FS_ERROR_MAX_FILES = -0x30013,
46  FS_ERROR_MAX_DIRS = -0x30014,
49  FS_ERROR_NOT_FOUND = -0x30017,
50  FS_ERROR_NOT_EMPTY = -0x30018,
65  FS_ERROR_NOT_FILE = -0x30028,
66  FS_ERROR_NOT_DIR = -0x30029,
74 } FSError;
75 
76 typedef enum FSMode
77 {
81 
85 
89 } FSMode;
90 
91 typedef enum FSStatFlags
92 {
93  FS_STAT_DIRECTORY = 0x80000000,
94 } FSStatFlags;
95 
96 typedef enum FSVolumeState
97 {
110 } FSVolumeState;
111 
112 typedef enum FSMountSourceType
113 {
117 
118 typedef struct FSClient
119 {
121 } FSClient;
122 
123 typedef struct FSCmdBlock
124 {
126 } FSCmdBlock;
127 
128 typedef struct FSStat
129 {
136 } FSStat;
137 
138 typedef struct FSStateChangeInfo
139 {
142 
144 
145 typedef struct FSAsyncData
146 {
150 } FSAsyncData;
151 
152 typedef struct FSDirectoryEntry
153 {
155  char name[256];
157 
158 typedef struct FSMountSource
159 {
161 } FSMountSource;
162 
163 void FSInit();
164 void FSShutdown();
165 
167 FSStatus FSAddClientEx(FSClient *pClient, s32 unk_zero_param, uint32_t errHandling);
173 FSStatus FSGetCwd(FSClient *client, FSCmdBlock *block, char *buffer, uint32_t bufferSize,
174  uint32_t flags);
177  FSAsyncData *asyncData);
178 FSStatus FSGetStat(FSClient *client, FSCmdBlock *block, const char *path, FSStat *stat,
179  uint32_t flags);
180 FSStatus FSGetStatAsync(FSClient *client, FSCmdBlock *block, const char *path, FSStat *stat,
181  uint32_t flags, FSAsyncData *asyncData);
182 FSStatus FSRemove(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags);
184  FSAsyncData *asyncData);
185 FSStatus FSOpenFile(FSClient *client, FSCmdBlock *block, const char *path, const char *mode,
186  FSFileHandle *handle, uint32_t flags);
187 FSStatus FSOpenFileAsync(FSClient *client, FSCmdBlock *block, const char *path, const char *mode,
188  FSFileHandle *outHandle, uint32_t flags, FSAsyncData *asyncData);
191  FSAsyncData *asyncData);
192 FSStatus FSOpenDir(FSClient *client, FSCmdBlock *block, const char *path, FSDirectoryHandle *handle,
193  uint32_t flags);
194 FSStatus FSOpenDirAsync(FSClient *client, FSCmdBlock *block, const char *path,
195  FSDirectoryHandle *handle, uint32_t flags, FSAsyncData *asyncData);
196 FSStatus FSMakeDir(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags);
198  FSAsyncData *asyncData);
202  FSDirectoryEntry *entry, uint32_t flags, FSAsyncData *asyncData);
206  uint32_t flags, FSAsyncData *asyncData);
209  uint32_t flags, FSAsyncData *asyncData);
210 FSStatus FSGetFreeSpaceSize(FSClient *client, FSCmdBlock *block, char *path, u64 *outSize,
211  uint32_t flags);
213  uint32_t flags, FSAsyncData *asyncData);
215  uint32_t flags);
217  uint32_t flags, FSAsyncData *asyncData);
221  uint32_t count, FSFileHandle handle, uint32_t unk1, uint32_t flags, FSAsyncData *asyncData);
226  FSAsyncData *asyncData);
230  uint32_t count, FSFileHandle handle, uint32_t unk1, uint32_t flags, FSAsyncData *asyncData);
235  FSAsyncData *asyncData);
237  uint32_t flags);
239  uint32_t *pos, uint32_t flags, FSAsyncData *asyncData);
241  uint32_t flags);
243  uint32_t flags, FSAsyncData *asyncData);
246  FSAsyncData *asyncData);
249  uint32_t flags, FSAsyncData *asyncData);
250 FSStatus FSRename(FSClient *client, FSCmdBlock *block, const char *oldPath, const char *newPath,
251  uint32_t flags);
252 FSStatus FSRenameAsync(FSClient *client, FSCmdBlock *block, const char *oldPath,
253  const char *newPath, uint32_t flags, FSAsyncData *asyncData);
259  uint32_t bytes, uint32_t flags);
260 FSStatus FSUnmount(FSClient *client, FSCmdBlock *cmd, const char *target, uint32_t flags);
261 FSStatus FSBindMount(FSClient *client, FSCmdBlock *cmd, const char *source, const char *target,
262  uint32_t flags);
264 
265 #ifdef __cplusplus
266 }
267 #endif
FSStatus FSbindUnmount(FSClient *client, FSCmdBlock *cmd, const char *target, uint32_t flags)
void FSInitCmdBlock(FSCmdBlock *block)
Definition: fs.h:18
FSStatus FSBindMount(FSClient *client, FSCmdBlock *cmd, const char *source, const char *target, uint32_t flags)
Definition: fs.h:158
uint32_t __unknown[0x5C0]
Definition: fs.h:120
GLuint const GLchar * name
Definition: glext.h:6671
Definition: fs.h:69
static Handle fileHandle
Definition: hax2.c:24
Definition: fs.h:83
FSStatus FSSetCmdPriority(FSCmdBlock *block, FSPriority priority)
int32_t s32
32bit signed integer
Definition: gctypes.h:24
GLenum mode
Definition: glext.h:6857
Definition: fs.h:115
Definition: fs.h:71
Definition: fs.h:28
FSStatus FSFlushFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t flags)
FSStatus FSWriteFileAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:80
FSStatus FSChangeDir(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags)
Definition: fs.h:128
Definition: fs.h:41
FSStatus FSGetFreeSpaceSizeAsync(FSClient *client, FSCmdBlock *block, char *path, u64 *outSize, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:51
Definition: fs.h:48
Definition: fs.h:30
FSStatus FSRewindDir(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, uint32_t flags)
uint32_t FSGetClientNum()
void FSSetStateChangeNotification(FSClient *client, FSStateChangeInfo *info)
Definition: libretro.h:2275
Definition: fs.h:152
GLsizei const GLchar ** path
Definition: glext.h:7901
Definition: fs.h:102
Definition: fs.h:24
FSStat info
Definition: fs.h:154
GLsizeiptr size
Definition: glext.h:6559
uint32_t __unknown
Definition: fs.h:149
uint32_t size
Definition: fs.h:134
FSStatus FSGetStat(FSClient *client, FSCmdBlock *block, const char *path, FSStat *stat, uint32_t flags)
Definition: fs.h:46
struct FSStat FSStat
FSError
Definition: fs.h:35
struct FSDirectoryEntry FSDirectoryEntry
FSStatus FSCloseFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t flags)
struct passwd out
Definition: missing_libc_functions.c:51
Definition: fs.h:22
Definition: fs.h:58
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
void FSInit()
FSVolumeState FSGetVolumeState(FSClient *client)
struct FSClient FSClient
FSStatus FSMount(FSClient *client, FSCmdBlock *cmd, FSMountSource *source, const char *target, uint32_t bytes, uint32_t flags)
GLuint GLuint GLsizei count
Definition: glext.h:6292
Definition: fs.h:43
uint32_t group
Definition: fs.h:133
Definition: fs.h:65
FSStatus FSGetStatAsync(FSClient *client, FSCmdBlock *block, const char *path, FSStat *stat, uint32_t flags, FSAsyncData *asyncData)
FSMountSourceType
Definition: fs.h:112
uint32_t owner
Definition: fs.h:132
Definition: fs.h:55
FSStatus FSGetPosFile(FSClient *client, FSCmdBlock *block, FSFileHandle fileHandle, uint32_t *pos, uint32_t flags)
FSStatus FSSetPosFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t pos, uint32_t flags)
Definition: fs.h:103
Definition: fs.h:84
Definition: fs.h:59
Definition: fs.h:20
Definition: fs.h:109
FSStatus FSTruncateFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:145
FSStatus FSUnmount(FSClient *client, FSCmdBlock *cmd, const char *target, uint32_t flags)
Definition: fs.h:104
GLenum type
Definition: glext.h:6233
Definition: fs.h:123
FSStatus FSReadDirAsync(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSDirectoryEntry *entry, uint32_t flags, FSAsyncData *asyncData)
ubyte cmd
Definition: wiiuse_internal.h:319
FSStatus FSGetCwd(FSClient *client, FSCmdBlock *block, char *buffer, uint32_t bufferSize, uint32_t flags)
Definition: fs.h:108
Definition: fs.h:14
Definition: fs.h:66
FSStatus FSOpenDir(FSClient *client, FSCmdBlock *block, const char *path, FSDirectoryHandle *handle, uint32_t flags)
FSStatus FSSetPosFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t pos, uint32_t flags, FSAsyncData *asyncData)
FSStatus FSFlushFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:72
FSStatus
Definition: fs.h:12
FSStatus FSReadFileWithPosAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, uint32_t flags, FSAsyncData *asyncData)
FSStatus FSRename(FSClient *client, FSCmdBlock *block, const char *oldPath, const char *newPath, uint32_t flags)
FSStatus FSReadFile(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, uint32_t flags)
FSStatus FSCloseDirAsync(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:79
Definition: fs.h:31
Definition: fs.h:49
uint32_t FSFileHandle
Definition: fs.h:9
Definition: fs.h:138
Definition: fs.h:98
FSStatus FSChangeDirAsync(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags, FSAsyncData *asyncData)
uint32_t callback
Definition: fs.h:147
FSStatus FSGetMountSource(FSClient *client, FSCmdBlock *cmd, FSMountSourceType type, FSMountSource *out, uint32_t flags)
Definition: fs.h:61
Definition: fs.h:99
void(* FSAsyncCallback)(FSClient *, FSCmdBlock *, FSStatus, uint32_t)
Definition: fs.h:143
Definition: fs.h:100
FSStatus FSGetPosFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle fileHandle, uint32_t *pos, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:118
Definition: fs.h:86
Definition: fs.h:56
FSStatus FSRenameAsync(FSClient *client, FSCmdBlock *block, const char *oldPath, const char *newPath, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:26
FSStatus FSReadFileAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, uint32_t flags, FSAsyncData *asyncData)
FSStatus FSChangeModeAsync(FSClient *client, FSCmdBlock *block, char *path, FSMode mode, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:63
Definition: fs.h:25
uint32_t __unknown[0x14]
Definition: fs.h:135
FSStatus FSCloseDir(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, uint32_t flags)
static const struct @104 priority[]
FSStatus FSMakeDirAsync(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:78
FSStatus FSWriteFile(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, uint32_t flags)
FSStatFlags
Definition: fs.h:91
Definition: fs.h:73
Definition: fs.h:60
FSStatus FSAddClientEx(FSClient *pClient, s32 unk_zero_param, uint32_t errHandling)
static int block
Definition: psp2.c:31
Definition: fs.h:29
FSStatus FSTruncateFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t flags)
FSStatus FSAddClient(FSClient *client, uint32_t flags)
Definition: fs.h:93
Definition: fs.h:38
Definition: fs.h:54
Definition: fs.h:88
FSStatus FSReadFileWithPos(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, uint32_t flags)
Definition: fs.h:64
GLsizei GLsizei GLchar * source
Definition: glext.h:6688
Definition: fs.h:19
struct FSAsyncData FSAsyncData
FSStatus FSOpenFileAsync(FSClient *client, FSCmdBlock *block, const char *path, const char *mode, FSFileHandle *outHandle, uint32_t flags, FSAsyncData *asyncData)
uint64_t u64
64bit unsigned integer
Definition: gctypes.h:20
FSStatus FSRemove(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags)
Definition: fs.h:67
uint32_t param
Definition: fs.h:148
struct FSMountSource FSMountSource
Definition: fs.h:42
uint32_t __unknown[0xC0]
Definition: fs.h:160
Definition: fs.h:17
Definition: fs.h:57
Definition: fs.h:39
FSStatus FSWriteFileWithPos(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, uint32_t flags)
FSStatus FSGetStatFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSStat *stat, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:114
Definition: fs.h:82
FSStatus FSDelClient(FSClient *client, uint32_t flags)
struct FSCmdBlock FSCmdBlock
FSStatus FSOpenDirAsync(FSClient *client, FSCmdBlock *block, const char *path, FSDirectoryHandle *handle, uint32_t flags, FSAsyncData *asyncData)
struct FSStateChangeInfo FSStateChangeInfo
Definition: ffmpeg_fft.c:36
Definition: fs.h:27
Definition: fs.h:105
FSStatus FSRemoveAsync(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:68
FSStatus FSOpenFile(FSClient *client, FSCmdBlock *block, const char *path, const char *mode, FSFileHandle *handle, uint32_t flags)
FSStatus FSMakeDir(FSClient *client, FSCmdBlock *block, const char *path, uint32_t flags)
FSStatus FSGetFreeSpaceSize(FSClient *client, FSCmdBlock *block, char *path, u64 *outSize, uint32_t flags)
Definition: fs.h:44
uint32_t FSDirectoryHandle
Definition: fs.h:8
Definition: fs.h:70
FSStatus FSGetStatFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSStat *stat, uint32_t flags)
uint32_t __unknown[0x2A0]
Definition: fs.h:125
FSMode
Definition: fs.h:76
uint32_t FSPriority
Definition: fs.h:10
FSStatus FSReadDir(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSDirectoryEntry *entry, uint32_t flags)
Definition: fs.h:53
Definition: video4linux2.c:51
Definition: fs.h:37
GLbitfield flags
Definition: glext.h:7828
FSStatFlags flags
Definition: fs.h:130
Definition: fs.h:32
Definition: fs.h:23
FSError FSGetLastErrorCodeForViewer(FSClient *client)
Definition: fs.h:107
void FSShutdown()
Definition: fs.h:21
Definition: fs.h:40
FSStatus FSChangeMode(FSClient *client, FSCmdBlock *block, char *path, FSMode mode, uint32_t flags)
FSStatus FSWriteFileWithPosAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, uint32_t flags, FSAsyncData *asyncData)
unsigned char uint8_t
Definition: stdint.h:124
unsigned int uint32_t
Definition: stdint.h:126
Definition: fs.h:101
FSVolumeState
Definition: fs.h:96
FSMode mode
Definition: fs.h:131
Definition: fs.h:52
FSStatus FSCloseFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t flags, FSAsyncData *asyncData)
Definition: fs.h:50
Definition: fs.h:47
Definition: fs.h:45
uint32_t __unknown[0x3]
Definition: fs.h:140
Definition: fs.h:87
Definition: fs.h:16
Definition: fs.h:15