Exports for Kernel.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
SceIofilemgrForDriver_stub
|
SceUID | ksceIoOpen (const char *file, int flags, SceMode mode) |
| Open or create a file for reading or writing. More...
|
|
int | ksceIoClose (SceUID fd) |
| Delete a descriptor. More...
|
|
int | ksceIoRead (SceUID fd, void *data, SceSize size) |
| Read input. More...
|
|
int | ksceIoPread (SceUID fd, void *data, SceSize size, SceOff offset) |
| Read input at offset. More...
|
|
int | ksceIoWrite (SceUID fd, const void *data, SceSize size) |
| Write output. More...
|
|
int | ksceIoPwrite (SceUID fd, const void *data, SceSize size, SceOff offset) |
| Write output at offset. More...
|
|
SceOff | ksceIoLseek (SceUID fd, SceOff offset, int whence) |
| Reposition read/write file descriptor offset. More...
|
|
int | ksceIoRemove (const char *file) |
| Remove directory entry. More...
|
|
int | ksceIoRename (const char *oldname, const char *newname) |
| Change the name of a file. More...
|
|
int | ksceIoSync (const char *device, unsigned int unk) |
| Synchronize the file data on the device. More...
|
|
int | ksceIoSyncByFd (SceUID fd) |
| Synchronize the file data for one file. More...
|
|
◆ ksceIoOpen()
Open or create a file for reading or writing.
- Example1: Open a file for reading
}
SceUID ksceIoOpen(const char *file, int flags, SceMode mode)
Open or create a file for reading or writing.
@ SCE_O_RDONLY
Read-only.
Definition: iofilemgr.h:29
- Example2: Open a file for writing, creating it if it doesn't exist
}
@ SCE_O_WRONLY
Write-only.
Definition: iofilemgr.h:30
@ SCE_O_CREAT
Create.
Definition: iofilemgr.h:37
- Parameters
-
file | - Pointer to a string holding the name of the file to open |
flags | - Libc styled flags that are or'ed together |
mode | - File access mode (One or more SceIoMode). |
- Returns
- A non-negative integer is a valid fd, anything else an error
◆ ksceIoClose()
Delete a descriptor.
int ksceIoClose(SceUID fd)
Delete a descriptor.
- Parameters
-
fd | - File descriptor to close |
- Returns
- < 0 on error
◆ ksceIoRead()
Read input.
- Example:
int ksceIoRead(SceUID fd, void *data, SceSize size)
Read input.
- Parameters
-
fd | - Opened file descriptor to read from |
data | - Pointer to the buffer where the read data will be placed |
size | - Size of the read in bytes |
- Returns
- The number of bytes read
◆ ksceIoPread()
Read input at offset.
- Example:
int ksceIoPread(SceUID fd, void *data, SceSize size, SceOff offset)
Read input at offset.
- Parameters
-
fd | - Opened file descriptor to read from |
data | - Pointer to the buffer where the read data will be placed |
size | - Size of the read in bytes |
offset | - Offset to read |
- Returns
- < 0 on error.
◆ ksceIoWrite()
Write output.
- Example:
int ksceIoWrite(SceUID fd, const void *data, SceSize size)
Write output.
- Parameters
-
fd | - Opened file descriptor to write to |
data | - Pointer to the data to write |
size | - Size of data to write |
- Returns
- The number of bytes written
◆ ksceIoPwrite()
Write output at offset.
- Example:
int ksceIoPwrite(SceUID fd, const void *data, SceSize size, SceOff offset)
Write output at offset.
- Parameters
-
fd | - Opened file descriptor to write to |
data | - Pointer to the data to write |
size | - Size of data to write |
offset | - Offset to write |
- Returns
- The number of bytes written
◆ ksceIoLseek()
Reposition read/write file descriptor offset.
- Example:
SceOff ksceIoLseek(SceUID fd, SceOff offset, int whence)
Reposition read/write file descriptor offset.
@ SCE_SEEK_END
Starts from the end of the file.
Definition: iofilemgr.h:52
- Parameters
-
fd | - Opened file descriptor with which to seek |
offset | - Relative offset from the start position given by whence |
whence | - One of SceIoSeekMode. |
- Returns
- The position in the file after the seek.
◆ ksceIoRemove()
int ksceIoRemove |
( |
const char * |
file | ) |
|
Remove directory entry.
- Parameters
-
file | - Path to the file to remove |
- Returns
- < 0 on error
◆ ksceIoRename()
int ksceIoRename |
( |
const char * |
oldname, |
|
|
const char * |
newname |
|
) |
| |
Change the name of a file.
- Parameters
-
oldname | - The old filename |
newname | - The new filename |
- Returns
- < 0 on error.
◆ ksceIoSync()
int ksceIoSync |
( |
const char * |
device, |
|
|
unsigned int |
unk |
|
) |
| |
Synchronize the file data on the device.
- Parameters
-
device | - The device to synchronize (e.g. msfat0:) |
unk | - Unknown |
◆ ksceIoSyncByFd()
int ksceIoSyncByFd |
( |
SceUID |
fd | ) |
|
Synchronize the file data for one file.
- Parameters
-
fd | - Opened file descriptor to sync |
- Returns
- < 0 on error.