MAV'RIC
|
File objects on linux platforms. More...
#include <file_flash_avr32.hpp>
Public Member Functions | |
File_flash_avr32 (const char *path) | |
Constructor. | |
bool | open (const char *path) |
Open the file. | |
bool | is_open () |
Indicates if the file is currently open. | |
int8_t | exists (const char *path) |
Indicates if the file exits. | |
bool | close () |
Close the file. | |
bool | read (uint8_t *data, uint32_t size) |
Read from the file. | |
bool | write (const uint8_t *data, uint32_t size) |
Write to the file. | |
bool | seek (int32_t offset, file_seekfrom_t origin) |
Seek to a given offset within the file. | |
uint32_t | offset () |
Get current location in file. | |
uint32_t | length () |
Get the file length. | |
bool | flush () |
flush buffer to file |
File objects on linux platforms.
bool File_flash_avr32::close | ( | ) | [virtual] |
int8_t File_flash_avr32::exists | ( | const char * | path | ) | [virtual] |
Indicates if the file exits.
Implements File.
bool File_flash_avr32::flush | ( | ) | [virtual] |
bool File_flash_avr32::is_open | ( | ) | [virtual] |
Indicates if the file is currently open.
Implements File.
uint32_t File_flash_avr32::length | ( | ) | [virtual] |
uint32_t File_flash_avr32::offset | ( | ) | [virtual] |
Get current location in file.
Implements File.
bool File_flash_avr32::open | ( | const char * | path | ) | [virtual] |
bool File_flash_avr32::read | ( | uint8_t * | data, |
uint32_t | size | ||
) | [virtual] |
Read from the file.
data | Caller supplied buffer to write to. |
size | The number of bytes to attempt to read. |
Implements File.
bool File_flash_avr32::seek | ( | int32_t | offset, |
file_seekfrom_t | origin | ||
) | [virtual] |
Seek to a given offset within the file.
Valid locations to seek to are from zero to the file length. Seeking to the file length moves the pointer to one past the end of the file data so that subsequent file writes append to the existing file.
offset | The distance to move from the origin_ parameter. |
origin | One of the SeekFrom enumeration. |
Implements File.
bool File_flash_avr32::write | ( | const uint8_t * | data, |
uint32_t | size | ||
) | [virtual] |
Write to the file.
data | The buffer to write. |
size | The number of bytes to write. |
Implements File.