PSPSDK 2025-04-22
Loading...
Searching...
No Matches
pspiofilemgr.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspiofilemgr.h - Prototypes for the sceIo library.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
13#ifndef __FILEIO_H__
14#define __FILEIO_H__
15
16#include <pspkerneltypes.h>
17#include <psptypes.h>
18#include <pspiofilemgr_fcntl.h>
19#include <pspiofilemgr_stat.h>
20#include <pspiofilemgr_dirent.h>
21#include <pspiofilemgr_devctl.h>
22
27#ifdef __cplusplus
28extern "C" {
29#endif
30
42
64SceUID sceIoOpen(const char *file, int flags, SceMode mode);
65
74SceUID sceIoOpenAsync(const char *file, int flags, SceMode mode);
75
87
95
110int sceIoRead(SceUID fd, void *data, SceSize size);
111
126int sceIoReadAsync(SceUID fd, void *data, SceSize size);
127
142int sceIoWrite(SceUID fd, const void *data, SceSize size);
143
153int sceIoWriteAsync(SceUID fd, const void *data, SceSize size);
154
170SceOff sceIoLseek(SceUID fd, SceOff offset, int whence);
171
182int sceIoLseekAsync(SceUID fd, SceOff offset, int whence);
183
199int sceIoLseek32(SceUID fd, int offset, int whence);
200
211int sceIoLseek32Async(SceUID fd, int offset, int whence);
212
219int sceIoRemove(const char *file);
220
228int sceIoMkdir(const char *dir, SceMode mode);
229
236int sceIoRmdir(const char *path);
237
244int sceIoChdir(const char *path);
245
253int sceIoRename(const char *oldname, const char *newname);
254
268SceUID sceIoDopen(const char *dirname);
269
282
290
307int sceIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
308
326int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void* unk1, long unk2);
327
335int sceIoUnassign(const char *dev);
336
345int sceIoGetstat(const char *file, SceIoStat *stat);
346
356int sceIoChstat(const char *file, SceIoStat *stat, int bits);
357
369int sceIoIoctl(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
370
382int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
383
390int sceIoSync(const char *device, unsigned int unk);
391
401
411
421
431int sceIoGetAsyncStat(SceUID fd, int poll, SceInt64 *res);
432
441
450
460
470int sceIoSetAsyncCallback(SceUID fd, SceUID cb, void *argp);
471
474#ifdef __cplusplus
475}
476#endif
477
478#endif
int sceIoChangeAsyncPriority(SceUID fd, int pri)
Change the priority of the asynchronous thread.
int sceIoUnassign(const char *dev)
Unassign an IO device.
int sceIoClose(SceUID fd)
Delete a descriptor.
int sceIoCloseAsync(SceUID fd)
Delete a descriptor (asynchronous)
int sceIoLseekAsync(SceUID fd, SceOff offset, int whence)
Reposition read/write file descriptor offset (asynchronous)
int sceIoGetstat(const char *file, SceIoStat *stat)
Get the status of a file.
int sceIoLseek32Async(SceUID fd, int offset, int whence)
Reposition read/write file descriptor offset (32bit mode, asynchronous)
int sceIoRead(SceUID fd, void *data, SceSize size)
Read input.
int sceIoGetAsyncStat(SceUID fd, int poll, SceInt64 *res)
Get the asyncronous completion status.
int sceIoPollAsync(SceUID fd, SceInt64 *res)
Poll for asyncronous completion.
int sceIoSync(const char *device, unsigned int unk)
Synchronise the file data on the device.
int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen)
Perform an ioctl on a device.
int sceIoSetAsyncCallback(SceUID fd, SceUID cb, void *argp)
Sets a callback for the asynchronous action.
SceOff sceIoLseek(SceUID fd, SceOff offset, int whence)
Reposition read/write file descriptor offset.
int sceIoChdir(const char *path)
Change the current directory.
SceUID sceIoOpen(const char *file, int flags, SceMode mode)
Open or create a file for reading or writing.
int sceIoChstat(const char *file, SceIoStat *stat, int bits)
Change the status of a file.
int sceIoWriteAsync(SceUID fd, const void *data, SceSize size)
Write output (asynchronous)
int sceIoRmdir(const char *path)
Remove a directory file.
SceUID sceIoDopen(const char *dirname)
Open a directory.
int sceIoDread(SceUID fd, SceIoDirent *dir)
Reads an entry from an opened file descriptor.
int sceIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen)
Send a devctl command to a device.
int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void *unk1, long unk2)
Assigns one IO device to another (I guess)
SceUID sceIoOpenAsync(const char *file, int flags, SceMode mode)
Open or create a file for reading or writing (asynchronous)
int sceIoRename(const char *oldname, const char *newname)
Change the name of a file.
int sceIoIoctl(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen)
Perform an ioctl on a device.
int sceIoWrite(SceUID fd, const void *data, SceSize size)
Write output.
int sceIoReadAsync(SceUID fd, void *data, SceSize size)
Read input (asynchronous)
int sceIoLseek32(SceUID fd, int offset, int whence)
Reposition read/write file descriptor offset (32bit mode)
int sceIoGetDevType(SceUID fd)
Get the device type of the currently opened file descriptor.
int sceIoDclose(SceUID fd)
Close an opened directory file descriptor.
int sceIoCancel(SceUID fd)
Cancel an asynchronous operation on a file descriptor.
int sceIoWaitAsyncCB(SceUID fd, SceInt64 *res)
Wait for asyncronous completion (with callbacks).
int sceIoMkdir(const char *dir, SceMode mode)
Make a directory file.
int sceIoWaitAsync(SceUID fd, SceInt64 *res)
Wait for asyncronous completion.
int sceIoRemove(const char *file)
Remove directory entry.
IoAssignPerms
Permission value for the sceIoAssign function.
Definition pspiofilemgr.h:36
@ IOASSIGN_RDWR
Assign the device read/write.
Definition pspiofilemgr.h:38
@ IOASSIGN_RDONLY
Assign the device read only.
Definition pspiofilemgr.h:40
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
SceInt64 SceOff
Definition pspkerneltypes.h:35
int SceMode
Definition pspkerneltypes.h:34
unsigned int SceSize
Definition psptypes.h:103
int64_t SceInt64
Definition psptypes.h:88
Describes a single directory entry.
Definition pspiofilemgr_dirent.h:24
Structure to hold the status information about a file.
Definition pspiofilemgr_stat.h:102