PS2SDK
PS2 Homebrew Libraries
pfs_fio.h
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #ifndef _PFS_FIO_H
12 #define _PFS_FIO_H
13 
14 #define PFS_FDIRO (0x0008) /* internal use for dopen */
15 
17 // Function declarations
18 
19 extern int pfsFioCheckForLastError(pfs_mount_t *pfsMount, int rv);
20 extern int pfsFioCheckFileSlot(pfs_file_slot_t *fileSlot);
21 extern pfs_mount_t *pfsFioGetMountedUnit(int unit);
22 extern void pfsFioCloseFileSlot(pfs_file_slot_t *fileSlot);
23 
25 // I/O functions
26 
27 extern int pfsFioInit(iomanX_iop_device_t *f);
28 extern int pfsFioDeinit(iomanX_iop_device_t *f);
29 extern int pfsFioFormat(iomanX_iop_file_t *, const char *dev, const char *blockdev, void *arg, int arglen);
30 extern int pfsFioOpen(iomanX_iop_file_t *f, const char *name, int flags, int mode);
31 extern int pfsFioClose(iomanX_iop_file_t *f);
32 extern int pfsFioRead(iomanX_iop_file_t *f, void *buf, int size);
33 extern int pfsFioWrite(iomanX_iop_file_t *f, void *buf, int size);
34 extern int pfsFioLseek(iomanX_iop_file_t *f, int pos, int whence);
35 extern int pfsFioRemove(iomanX_iop_file_t *f, const char *name);
36 extern int pfsFioMkdir(iomanX_iop_file_t *f, const char *path, int mode);
37 extern int pfsFioRmdir(iomanX_iop_file_t *f, const char *path);
38 extern int pfsFioDopen(iomanX_iop_file_t *f, const char *name);
39 extern int pfsFioDclose(iomanX_iop_file_t *f);
40 extern int pfsFioDread(iomanX_iop_file_t *f, iox_dirent_t *buf);
41 extern int pfsFioGetstat(iomanX_iop_file_t *f, const char *name, iox_stat_t *stat);
42 extern int pfsFioChstat(iomanX_iop_file_t *f, const char *name, iox_stat_t *stat, unsigned int statmask);
43 extern int pfsFioRename(iomanX_iop_file_t *f, const char *old, const char *new_);
44 extern int pfsFioChdir(iomanX_iop_file_t *f, const char *name);
45 extern int pfsFioSync(iomanX_iop_file_t *f, const char *dev, int flag);
46 extern int pfsFioMount(iomanX_iop_file_t *f, const char *fsname, const char *devname, int flag, void *arg, int arglen);
47 extern int pfsFioUmount(iomanX_iop_file_t *f, const char *fsname);
48 extern s64 pfsFioLseek64(iomanX_iop_file_t *f, s64 offset, int whence);
49 extern int pfsFioSymlink(iomanX_iop_file_t *f, const char *old, const char *new_);
50 extern int pfsFioReadlink(iomanX_iop_file_t *f, const char *path, char *buf, unsigned int buflen);
51 
52 #endif /* _PFS_FIO_H */
iox_stat_t
Definition: iox_stat.h:92
_iomanX_iop_file
Definition: iomanX.h:70
pfs_file_slot_t
Definition: pfs.h:38
_iomanX_iop_device
Definition: iomanX.h:81
iox_dirent_t
Definition: iox_stat.h:111
pfs_mount_t
Definition: libpfs.h:178