|
bool(*const | open )(void *context, File *file, const char *path, FS_AccessMode access_mode, FS_OpenMode open_mode) |
| File api structure.
|
|
bool(*const | close )(void *context, File *file) |
| Close file.
|
|
uint16_t(* | read )(void *context, File *file, void *buff, uint16_t bytes_to_read) |
| Read bytes from file to buffer.
|
|
uint16_t(* | write )(void *context, File *file, const void *buff, uint16_t bytes_to_write) |
| Write bytes from buffer to file.
|
|
bool(*const | seek )(void *context, File *file, uint32_t offset, bool from_start) |
| Move r/w pointer.
|
|
uint64_t(* | tell )(void *context, File *file) |
| Get r/w pointer position.
|
|
bool(*const | truncate )(void *context, File *file) |
| Truncate file size to current r/w pointer position.
|
|
uint64_t(* | size )(void *context, File *file) |
| Fet file size.
|
|
bool(*const | sync )(void *context, File *file) |
| Write file cache to storage.
|
|
bool(*const | eof )(void *context, File *file) |
| Checks that the r/w pointer is at the end of the file.
|
|
◆ close
bool(*const FS_File_Api::close) (void *context, File *file) |
Close file.
- Parameters
-
file | pointer to file object |
- Returns
- success flag
◆ eof
bool(*const FS_File_Api::eof) (void *context, File *file) |
Checks that the r/w pointer is at the end of the file.
- Parameters
-
file | pointer to file object |
- Returns
- end of file flag
◆ open
bool(*const FS_File_Api::open) (void *context, File *file, const char *path, FS_AccessMode access_mode, FS_OpenMode open_mode) |
File api structure.
Open file
- Parameters
-
file | pointer to file object, filled by api |
path | path to file |
access_mode | access mode from FS_AccessMode |
open_mode | open mode from FS_OpenMode |
- Returns
- success flag
◆ read
uint16_t(* FS_File_Api::read) (void *context, File *file, void *buff, uint16_t bytes_to_read) |
Read bytes from file to buffer.
- Parameters
-
file | pointer to file object |
buff | pointer to buffer for reading |
bytes_to_read | how many bytes to read, must be smaller or equal to buffer size |
- Returns
- how many bytes actually has been read
◆ seek
bool(*const FS_File_Api::seek) (void *context, File *file, uint32_t offset, bool from_start) |
Move r/w pointer.
- Parameters
-
file | pointer to file object |
offset | offset to move r/w pointer |
from_start | set offset from start, or from current position |
- Returns
- success flag
◆ size
uint64_t(* FS_File_Api::size) (void *context, File *file) |
Fet file size.
- Parameters
-
file | pointer to file object |
- Returns
- file size
◆ sync
bool(*const FS_File_Api::sync) (void *context, File *file) |
Write file cache to storage.
- Parameters
-
file | pointer to file object |
- Returns
- success flag
◆ tell
uint64_t(* FS_File_Api::tell) (void *context, File *file) |
Get r/w pointer position.
- Parameters
-
file | pointer to file object |
- Returns
- current r/w pointer position
◆ truncate
bool(*const FS_File_Api::truncate) (void *context, File *file) |
Truncate file size to current r/w pointer position.
- Parameters
-
file | pointer to file object |
- Returns
- success flag
◆ write
uint16_t(* FS_File_Api::write) (void *context, File *file, const void *buff, uint16_t bytes_to_write) |
Write bytes from buffer to file.
- Parameters
-
file | pointer to file object |
buff | pointer to buffer for writing |
bytes_to_read | how many bytes to write, must be smaller or equal to buffer size |
- Returns
- how many bytes actually has been written
The documentation for this struct was generated from the following file: