38uint32_t
FC_read(
struct FC* fc, uint32_t offset, uint32_t size, uint8_t* b);
65FC_write(
struct FC* fc, uint32_t offset, uint32_t size,
const uint8_t* b);
uint32_t FC_readto(struct FC *fc, uint32_t offset, uint32_t size, uint32_t maxCount, uint8_t *b)
Reads up to the given number of bytes from the file controller starting at the given offset,...
Definition fc.c:58
uint32_t FC_filesize(struct FC *fc)
Returns the size of the file backing the given file controller. This performs a seek to the end of th...
Definition fc.c:83
struct FC * FC_open(const char *fp, enum fc_mode_t mode)
Opens a file controller instance for the given file path and mode.
Definition fc.c:16
void FC_close(struct FC *fc)
Closes the given file controller instance and frees its resources.
Definition fc.c:39
uint32_t FC_write(struct FC *fc, uint32_t offset, uint32_t size, const uint8_t *b)
Writes the given number of bytes to the file controller starting at the given offset.
Definition fc.c:71
uint32_t FC_read(struct FC *fc, uint32_t offset, uint32_t size, uint8_t *b)
Reads the given number of bytes from the file controller starting at the given offset.
Definition fc.c:47
fc_mode_t
File controller open mode.
Definition fc.h:15
@ FC_MODE_WRITE
Equivalent to "wb".
Definition fc.h:17
@ FC_MODE_READ
Equivalent to "rb".
Definition fc.h:16
File controller that wraps a stdlib file pointer and provides additional functionality for reading fi...
Definition fc.c:10
char * fp
Duplicate of filepath provided to FC_open.
Definition fc.c:11