00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __FILEIO_H__
00015 #define __FILEIO_H__
00016
00017 #include <pspkerneltypes.h>
00018 #include <pspiofilemgr_fcntl.h>
00019 #include <pspiofilemgr_stat.h>
00020 #include <pspiofilemgr_dirent.h>
00021
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00032
00034 enum IoAssignPerms
00035 {
00037 IOASSIGN_RDWR = 0,
00039 IOASSIGN_RDONLY = 1
00040 };
00041
00063 SceUID sceIoOpen(const char *file, int flags, SceMode mode);
00064
00073 SceUID sceIoOpenAsync(const char *file, int flags, SceMode mode);
00074
00085 int sceIoClose(SceUID fd);
00086
00093 int sceIoCloseAsync(SceUID fd);
00094
00109 int sceIoRead(SceUID fd, void *data, SceSize size);
00110
00125 int sceIoReadAsync(SceUID fd, void *data, SceSize size);
00126
00141 int sceIoWrite(SceUID fd, const void *data, SceSize size);
00142
00152 int sceIoWriteAsync(SceUID fd, const void *data, SceSize size);
00153
00169 SceOff sceIoLseek(SceUID fd, SceOff offset, int whence);
00170
00181 int sceIoLseekAsync(SceUID fd, SceOff offset, int whence);
00182
00198 int sceIoLseek32(SceUID fd, int offset, int whence);
00199
00210 int sceIoLseek32Async(SceUID fd, int offset, int whence);
00211
00218 int sceIoRemove(const char *file);
00219
00227 int sceIoMkdir(const char *dir, SceMode mode);
00228
00235 int sceIoRmdir(const char *path);
00236
00243 int sceIoChdir(const char *path);
00244
00252 int sceIoRename(const char *oldname, const char *newname);
00253
00267 SceUID sceIoDopen(const char *dirname);
00268
00280 int sceIoDread(SceUID fd, SceIoDirent *dir);
00281
00288 int sceIoDclose(SceUID fd);
00289
00306 int sceIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
00307
00325 int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void* unk1, long unk2);
00326
00334 int sceIoUnassign(const char *dev);
00335
00344 int sceIoGetstat(const char *file, SceIoStat *stat);
00345
00355 int sceIoChstat(const char *file, SceIoStat *stat, int bits);
00356
00368 int sceIoIoctl(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
00369
00381 int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
00382
00389 int sceIoSync(const char *device, unsigned int unk);
00390
00399 int sceIoWaitAsync(SceUID fd, SceInt64 *res);
00400
00409 int sceIoWaitAsyncCB(SceUID fd, SceInt64 *res);
00410
00419 int sceIoPollAsync(SceUID fd, SceInt64 *res);
00420
00430 int sceIoGetAsyncStat(SceUID fd, int poll, SceInt64 *res);
00431
00439 int sceIoCancel(SceUID fd);
00440
00448 int sceIoGetDevType(SceUID fd);
00449
00458 int sceIoChangeAsyncPriority(SceUID fd, int pri);
00459
00469 int sceIoSetAsyncCallback(SceUID fd, SceUID cb, void *argp);
00470
00473 #ifdef __cplusplus
00474 }
00475 #endif
00476
00477 #endif