ar_osal/api/ar_osal_file_io.h
Functions
ar_fopen
ar_fopen open a file or create if does not exist.
ar_fhandle *
Handle to the file.
const char_t *
Absolute file path.
uint32_t
Type of access AR_FILE_OPEN_READ_ONLY AR_FILE_OPEN_WRITE_ONLY AR_FILE_OPEN_READ_WRITE AR_FOPEN_WRITE_ONLY_APPEND AR_FOPEN_READ_WRITE_APPEND AR_FOPEN_READ_ONLY_WRITE
ar_fsize
ar_fsize Return file size.
ar_fhandle
Handle to the file.
ar_fmap
ar_fmap Map a file into Data Memory for Read Only access
Whether this allocates heap memory for the buffer or not is platform dependent. On some platforms with low memory this may map non-volatile storage into a readable memory window instead. To free any possible resources allocated by this call, the caller MUST call ar_funmap
ar_fhandle
Handle to the file
const void **
A pointer to the read-only Data memory buffer
ar_funmap
ar_funmap Un-map a file from Data Memory
This call releases a buffer obtained by a previous call to ar_fmap and frees any resources that may be in use by it. The file still needs to be closed by a call to ar_fclose
const void *
The pointer to the file buffer obtained by ar_fmap
ar_fseek
ar_fseek Move the file pointer for read/write to the required offset.
ar_fhandle
Handle to the file.
size_t
The number of bytes to move the file pointer.
ar_fseek_reference_t
Refer to ar_fseek_reference_t for options.
ar_fread
ar_fread Read from file.
ar_fhandle
Handle to the file.
buf_ptr: Buffer pointer to read data into.
size_t
Data size to read from file.
bytes_read: Actual data size read from file.
ar_fwrite
ar_fwrite write to file.
ar_fhandle
Handle to the file.
void *
Buffer pointer to write data from.
size_t
Data size to write into file.
bytes_written: Actual data size written into file.
ar_fclose
ar_fclose
ar_fhandle
Handle to the file.
ar_fdelete
ar_fdelete
const char_t *
Absolute file path.

