Provides an API very similar to fread and friends but handles the intricacies of where files are actually hidden on each supported system.
More...
|
| KORE_FUNC bool | kore_file_reader_open (kore_file_reader *reader, const char *filepath, kore_file_type type) |
| | Opens a file for reading.
|
| KORE_FUNC bool | kore_file_reader_from_memory (kore_file_reader *reader, void *data, size_t size) |
| | Opens a memory area for reading using the file reader API.
|
| KORE_FUNC void | kore_file_reader_set_callback (bool(*callback)(kore_file_reader *reader, const char *filename, kore_file_type type)) |
| | Registers a file reader callback.
|
| KORE_FUNC bool | kore_file_reader_close (kore_file_reader *reader) |
| | Closes a file.
|
| KORE_FUNC size_t | kore_file_reader_read (kore_file_reader *reader, void *data, size_t size) |
| | Reads data from a file starting from the current reading-position and increases the reading-position accordingly.
|
| KORE_FUNC size_t | kore_file_reader_size (kore_file_reader *reader) |
| | Figures out the size of a file.
|
| KORE_FUNC size_t | kore_file_reader_pos (kore_file_reader *reader) |
| | Figures out the current reading-position in the file.
|
| KORE_FUNC bool | kore_file_reader_seek (kore_file_reader *reader, size_t pos) |
| | Sets the reading-position manually.
|
|
KORE_FUNC float | kore_read_f32le (uint8_t *data) |
| | Interprets four bytes starting at the provided pointer as a little-endian float.
|
|
KORE_FUNC float | kore_read_f32be (uint8_t *data) |
| | Interprets four bytes starting at the provided pointer as a big-endian float.
|
|
KORE_FUNC uint64_t | kore_read_u64le (uint8_t *data) |
| | Interprets eight bytes starting at the provided pointer as a little-endian uint64.
|
|
KORE_FUNC uint64_t | kore_read_u64be (uint8_t *data) |
| | Interprets eight bytes starting at the provided pointer as a big-endian uint64.
|
|
KORE_FUNC int64_t | kore_read_s64le (uint8_t *data) |
| | Interprets eight bytes starting at the provided pointer as a little-endian int64.
|
|
KORE_FUNC int64_t | kore_read_s64be (uint8_t *data) |
| | Interprets eight bytes starting at the provided pointer as a big-endian int64.
|
|
KORE_FUNC uint32_t | kore_read_u32le (uint8_t *data) |
| | Interprets four bytes starting at the provided pointer as a little-endian uint32.
|
|
KORE_FUNC uint32_t | kore_read_u32be (uint8_t *data) |
| | Interprets four bytes starting at the provided pointer as a big-endian uint32.
|
|
KORE_FUNC int32_t | kore_read_s32le (uint8_t *data) |
| | Interprets four bytes starting at the provided pointer as a little-endian int32.
|
|
KORE_FUNC int32_t | kore_read_s32be (uint8_t *data) |
| | Interprets four bytes starting at the provided pointer as a big-endian int32.
|
|
KORE_FUNC uint16_t | kore_read_u16le (uint8_t *data) |
| | Interprets two bytes starting at the provided pointer as a little-endian uint16.
|
|
KORE_FUNC uint16_t | kore_read_u16be (uint8_t *data) |
| | Interprets two bytes starting at the provided pointer as a big-endian uint16.
|
|
KORE_FUNC int16_t | kore_read_s16le (uint8_t *data) |
| | Interprets two bytes starting at the provided pointer as a little-endian int16.
|
|
KORE_FUNC int16_t | kore_read_s16be (uint8_t *data) |
| | Interprets two bytes starting at the provided pointer as a big-endian int16.
|
|
KORE_FUNC uint8_t | kore_read_u8 (uint8_t *data) |
| | Interprets one byte starting at the provided pointer as a uint8.
|
|
KORE_FUNC int8_t | kore_read_s8 (uint8_t *data) |
| | Interprets one byte starting at the provided pointer as an int8.
|
Provides an API very similar to fread and friends but handles the intricacies of where files are actually hidden on each supported system.