ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
fileio.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # (C)2001, Gustavo Scotti (gustavo@scotti.com)
7 # (c) 2003 Marcus R. Brown (mrbrown@0xd6.org)
8 # Licenced under Academic Free License version 2.0
9 # Review ps2sdk README & LICENSE files for further details.
10 */
11 
17 #ifndef __FILEIO_H__
18 #define __FILEIO_H__
19 
20 #include <io_common.h>
21 
22 #ifndef NEWLIB_PORT_AWARE
23 #error "Using fio/fileXio functions directly in the newlib port will lead to problems."
24 #error "Use posix function calls instead."
25 #endif
26 
27 #define FIO_PATH_MAX 256
28 
29 #define FIO_WAIT 0
30 #define FIO_NOWAIT 1
31 
32 #define FIO_COMPLETE 1
33 #define FIO_INCOMPLETE 0
34 
35 #define EOF (-1)
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 int fioInit(void);
42 void fioExit(void);
43 int fioOpen(const char *fname, int mode);
44 int fioClose( int fd);
45 int fioRead( int fd, void *buff, int buff_size);
46 int fioWrite( int fd, const void *buff, int buff_size);
47 int fioLseek( int fd, int offset, int whence);
48 int fioMkdir(const char* dirname);
49 int fioPutc(int fd,int c);
50 int fioGetc(int fd);
51 int fioGets(int fd, char* buff, int n);
52 void fioSetBlockMode(int blocking);
53 int fioSync(int mode, int *retVal);
54 int fioIoctl(int fd, int request, void *data);
55 int fioDopen(const char *name);
56 int fioDclose(int fd);
57 int fioDread(int fd, io_dirent_t *buf); //Warning! (*)
58 int fioGetstat(const char *name, io_stat_t *buf); //Warning! (*)
59 int fioChstat(const char *name, io_stat_t *buf, unsigned int cbit);
60 int fioRemove(const char *name); //Warning! (**)
61 int fioFormat(const char *name);
62 int fioRmdir(const char* dirname);
63 
64 /* * Function is unstable; does not suspend interrupts prior to performing DMA transfers on the IOP side.
65  ** Function is broken; falls through to the next case (mkdir) upon completion.
66 
67  Patches are available to fix these issues. Otherwise, please use fileXio instead. */
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* __FILEIO_H__ */
int fioInit(void)
int fioRmdir(const char *dirname)
int fioSync(int mode, int *retVal)
int fioChstat(const char *name, io_stat_t *buf, unsigned int cbit)
int fioWrite(int fd, const void *buff, int buff_size)
int fioPutc(int fd, int c)
int fioRead(int fd, void *buff, int buff_size)
int fioGetc(int fd)
void fioSetBlockMode(int blocking)
void fioExit(void)
int fioFormat(const char *name)
int fioMkdir(const char *dirname)
int fioGetstat(const char *name, io_stat_t *buf)
int fioRemove(const char *name)
int fioDclose(int fd)
int fioIoctl(int fd, int request, void *data)
int fioDopen(const char *name)
int fioGets(int fd, char *buff, int n)
int fioClose(int fd)
int fioDread(int fd, io_dirent_t *buf)
int fioLseek(int fd, int offset, int whence)
int fioOpen(const char *fname, int mode)
u32 data
Definition: libmouse.c:36
s32 mode
Definition: rpc_client.c:15
Definition: thread.c:17