PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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_WAIT 0
28
#define FIO_NOWAIT 1
29
30
#define FIO_COMPLETE 1
31
#define FIO_INCOMPLETE 0
32
33
#define EOF (-1)
34
35
#ifdef __cplusplus
36
extern
"C"
{
37
#endif
38
39
int
fioInit(
void
);
40
void
fioExit(
void
);
41
int
fioOpen(
const
char
*fname,
int
mode);
42
int
fioClose(
int
fd);
43
int
fioRead(
int
fd,
void
*buff,
int
buff_size);
44
int
fioWrite(
int
fd,
const
void
*buff,
int
buff_size);
45
int
fioLseek(
int
fd,
int
offset,
int
whence);
46
int
fioMkdir(
const
char
*dirname);
47
int
fioPutc(
int
fd,
int
c);
48
int
fioGetc(
int
fd);
49
int
fioGets(
int
fd,
char
*buff,
int
n);
50
void
fioSetBlockMode(
int
blocking);
51
int
fioSync(
int
mode,
int
*retVal);
52
int
fioIoctl(
int
fd,
int
request
,
void
*data);
53
int
fioDopen(
const
char
*name);
54
int
fioDclose(
int
fd);
55
int
fioDread(
int
fd,
io_dirent_t
*buf);
// Warning! (*)
56
int
fioGetstat(
const
char
*name,
io_stat_t
*buf);
// Warning! (*)
57
int
fioChstat(
const
char
*name,
io_stat_t
*buf,
unsigned
int
cbit);
58
int
fioRemove(
const
char
*name);
// Warning! (**)
59
int
fioFormat(
const
char
*name);
60
int
fioRmdir(
const
char
*dirname);
61
62
/* * Function is unstable; does not suspend interrupts prior to performing DMA transfers on the IOP side.
63
** Function is broken; falls through to the next case (mkdir) upon completion.
64
65
Patches are available to fix these issues. Otherwise, please use fileXio instead. */
66
67
#ifdef __cplusplus
68
}
69
#endif
70
71
#endif
/* __FILEIO_H__ */
io_common.h
io_dirent_t
Definition
io_common.h:59
io_stat_t
Definition
io_common.h:48
request
Definition
thread.c:18
ee
kernel
include
fileio.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8