PSPSDK 2024-12-16
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 <pspiofilemgr_fcntl.h>
18#include <pspiofilemgr_stat.h>
19#include <pspiofilemgr_dirent.h>
20#include <pspiofilemgr_devctl.h>
21
26#ifdef __cplusplus
27extern "C" {
28#endif
29
41
63SceUID sceIoOpen(const char *file, int flags, SceMode mode);
64
73SceUID sceIoOpenAsync(const char *file, int flags, SceMode mode);
74
86
94
109int sceIoRead(SceUID fd, void *data, SceSize size);
110
126
141int sceIoWrite(SceUID fd, const void *data, SceSize size);
142
152int sceIoWriteAsync(SceUID fd, const void *data, SceSize size);
153
170
182
199
211
218int sceIoRemove(const char *file);
219
227int sceIoMkdir(const char *dir, SceMode mode);
228
235int sceIoRmdir(const char *path);
236
243int sceIoChdir(const char *path);
244
252int sceIoRename(const char *oldname, const char *newname);
253
268
281
289
306int sceIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
307
325int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void* unk1, long unk2);
326
334int sceIoUnassign(const char *dev);
335
344int sceIoGetstat(const char *file, SceIoStat *stat);
345
355int sceIoChstat(const char *file, SceIoStat *stat, int bits);
356
368int sceIoIoctl(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
369
381int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
382
389int sceIoSync(const char *device, unsigned int unk);
390
400
410
420
431
440
449
459
470
473#ifdef __cplusplus
474}
475#endif
476
477#endif
u32 flags
Definition fixup.c:1
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:35
@ IOASSIGN_RDWR
Assign the device read/write.
Definition pspiofilemgr.h:37
@ IOASSIGN_RDONLY
Assign the device read only.
Definition pspiofilemgr.h:39
unsigned int SceSize
Definition pspkerneltypes.h:27
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 char size
Definition pspsysmem_kernel.h:6
unsigned char unk
Definition pspsysmem_kernel.h:5
int64_t SceInt64
Definition psptypes.h:88
float x
Definition psptypes.h:0
Describes a single directory entry.
Definition pspiofilemgr_dirent.h:24
Structure to hold the status information about a file.
Definition pspiofilemgr_stat.h:102