PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
19extern int pfsFioCheckForLastError(pfs_mount_t *pfsMount, int rv);
20extern int pfsFioCheckFileSlot(pfs_file_slot_t *fileSlot);
21extern pfs_mount_t *pfsFioGetMountedUnit(int unit);
22extern void pfsFioCloseFileSlot(pfs_file_slot_t *fileSlot);
23
25// I/O functions
26
27extern int pfsFioInit(iomanX_iop_device_t *f);
28extern int pfsFioDeinit(iomanX_iop_device_t *f);
29extern int pfsFioFormat(iomanX_iop_file_t *, const char *dev, const char *blockdev, void *arg, int arglen);
30extern int pfsFioOpen(iomanX_iop_file_t *f, const char *name, int flags, int mode);
31extern int pfsFioClose(iomanX_iop_file_t *f);
32extern int pfsFioRead(iomanX_iop_file_t *f, void *buf, int size);
33extern int pfsFioWrite(iomanX_iop_file_t *f, void *buf, int size);
34extern int pfsFioLseek(iomanX_iop_file_t *f, int pos, int whence);
35extern int pfsFioRemove(iomanX_iop_file_t *f, const char *name);
36extern int pfsFioMkdir(iomanX_iop_file_t *f, const char *path, int mode);
37extern int pfsFioRmdir(iomanX_iop_file_t *f, const char *path);
38extern int pfsFioDopen(iomanX_iop_file_t *f, const char *name);
39extern int pfsFioDclose(iomanX_iop_file_t *f);
40extern int pfsFioDread(iomanX_iop_file_t *f, iox_dirent_t *buf);
41extern int pfsFioGetstat(iomanX_iop_file_t *f, const char *name, iox_stat_t *stat);
42extern int pfsFioChstat(iomanX_iop_file_t *f, const char *name, iox_stat_t *stat, unsigned int statmask);
43extern int pfsFioRename(iomanX_iop_file_t *f, const char *old, const char *new);
44extern int pfsFioChdir(iomanX_iop_file_t *f, const char *name);
45extern int pfsFioSync(iomanX_iop_file_t *f, const char *dev, int flag);
46extern int pfsFioMount(iomanX_iop_file_t *f, const char *fsname, const char *devname, int flag, void *arg, int arglen);
47extern int pfsFioUmount(iomanX_iop_file_t *f, const char *fsname);
48extern s64 pfsFioLseek64(iomanX_iop_file_t *f, s64 offset, int whence);
49extern int pfsFioSymlink(iomanX_iop_file_t *f, const char *old, const char *new);
50extern int pfsFioReadlink(iomanX_iop_file_t *f, const char *path, char *buf, unsigned int buflen);
51
52#endif /* _PFS_FIO_H */