RetroArch
isfs.h
Go to the documentation of this file.
1 #ifndef __ISFS_H__
2 #define __ISFS_H__
3 
4 #if defined(HW_RVL)
5 
6 #include <gctypes.h>
7 
8 #define ISFS_MAXPATH IPC_MAXPATH_LEN
9 
10 #define ISFS_OPEN_READ 0x01
11 #define ISFS_OPEN_WRITE 0x02
12 #define ISFS_OPEN_RW (ISFS_OPEN_READ | ISFS_OPEN_WRITE)
13 
14 #define ISFS_OK 0
15 #define ISFS_ENOMEM -22
16 #define ISFS_EINVAL -101
17 
18 #ifdef __cplusplus
19  extern "C" {
20 #endif /* __cplusplus */
21 
22 typedef struct _fstats
23 {
24  u32 file_length;
25  u32 file_pos;
26 } fstats;
27 
28 typedef s32 (*isfscallback)(s32 result,void *usrdata);
29 
30 s32 ISFS_Initialize();
31 s32 ISFS_Deinitialize();
32 
33 s32 ISFS_Open(const char *filepath,u8 mode);
34 s32 ISFS_OpenAsync(const char *filepath,u8 mode,isfscallback cb,void *usrdata);
35 s32 ISFS_Close(s32 fd);
36 s32 ISFS_CloseAsync(s32 fd,isfscallback cb,void *usrdata);
37 s32 ISFS_Delete(const char *filepath);
38 s32 ISFS_DeleteAsync(const char *filepath,isfscallback cb,void *usrdata);
39 s32 ISFS_ReadDir(const char *filepath,char *name_list,u32 *num);
40 s32 ISFS_ReadDirAsync(const char *filepath,char *name_list,u32 *num,isfscallback cb,void *usrdata);
41 s32 ISFS_CreateFile(const char *filepath,u8 attributes,u8 owner_perm,u8 group_perm,u8 other_perm);
42 s32 ISFS_CreateFileAsync(const char *filepath,u8 attributes,u8 owner_perm,u8 group_perm,u8 other_perm,isfscallback cb,void *usrdata);
43 s32 ISFS_Write(s32 fd,const void *buffer,u32 length);
44 s32 ISFS_WriteAsync(s32 fd,const void *buffer,u32 length,isfscallback cb,void *usrdata);
45 s32 ISFS_Read(s32 fd,void *buffer,u32 length);
46 s32 ISFS_ReadAsync(s32 fd,void *buffer,u32 length,isfscallback cb,void *usrdata);
47 s32 ISFS_Seek(s32 fd,s32 where,s32 whence);
48 s32 ISFS_SeekAsync(s32 fd,s32 where,s32 whence,isfscallback cb,void *usrdata);
49 s32 ISFS_CreateDir(const char *filepath,u8 attributes,u8 owner_perm,u8 group_perm,u8 other_perm);
50 s32 ISFS_CreateDirAsync(const char *filepath,u8 attributes,u8 owner_perm,u8 group_perm,u8 other_perm,isfscallback cb,void *usrdata);
51 s32 ISFS_GetStats(void *stats);
52 s32 ISFS_GetStatsAsync(void *stats,isfscallback cb,void *usrdata);
53 s32 ISFS_GetFileStats(s32 fd,fstats *status);
54 s32 ISFS_GetFileStatsAsync(s32 fd,fstats *status,isfscallback cb,void *usrdata);
55 s32 ISFS_GetAttr(const char *filepath,u32 *ownerID,u16 *groupID,u8 *attributes,u8 *ownerperm,u8 *groupperm,u8 *otherperm);
56 s32 ISFS_GetAttrAsync(const char *filepath,u32 *ownerID,u16 *groupID,u8 *attributes,u8 *ownerperm,u8 *groupperm,u8 *otherperm,isfscallback cb,void *usrdata);
57 s32 ISFS_Rename(const char *filepathOld,const char *filepathNew);
58 s32 ISFS_RenameAsync(const char *filepathOld,const char *filepathNew,isfscallback cb,void *usrdata);
59 s32 ISFS_SetAttr(const char *filepath,u32 ownerID,u16 groupID,u8 attributes,u8 ownerperm,u8 groupperm,u8 otherperm);
60 s32 ISFS_SetAttrAsync(const char *filepath,u32 ownerID,u16 groupID,u8 attributes,u8 ownerperm,u8 groupperm,u8 otherperm,isfscallback cb,void *usrdata);
61 s32 ISFS_GetUsage(const char* filepath, u32* usage1, u32* usage2);
62 s32 ISFS_GetUsageAsync(const char* filepath, u32* usage1, u32* usage2,isfscallback cb,void *usrdata);
63 
64 #ifdef __cplusplus
65  }
66 #endif /* __cplusplus */
67 
68 #endif /* defined(HW_RVL) */
69 
70 #endif
int32_t s32
32bit signed integer
Definition: gctypes.h:24
GLenum mode
Definition: glext.h:6857
Data type definitions.
GLuint GLuint num
Definition: glext.h:10525
static GX2AttribVar attributes[]
Definition: bokeh.c:713
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
static char * filepath
Definition: mpv-libretro.c:60
GLuint64EXT * result
Definition: glext.h:12211
Definition: video4linux2.c:51
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233