File objects on linux platforms.
More...
#include <file_dummy.hpp>
List of all members.
Public Member Functions |
| File_dummy (void) |
| Constructor.
|
bool | open (const char __attribute__((unused))*path) |
| Open the file.
|
bool | is_open () |
| Indicates if the file is currently open.
|
int8_t | exists (const char __attribute__((unused))*path) |
| Indicates if the file exits.
|
bool | close () |
| Close the file.
|
bool | read (uint8_t __attribute__((unused))*data, uint32_t __attribute__((unused)) size) |
| Read from the file.
|
bool | write (const uint8_t __attribute__((unused))*data, uint32_t __attribute__((unused)) size) |
| Write to the file.
|
bool | seek (int32_t __attribute__((unused)) offset, file_seekfrom_t __attribute__((unused)) 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
|
Detailed Description
File objects on linux platforms.
Member Function Documentation
Close the file.
- Returns:
- success
Implements File.
Indicates if the file exits.
- Returns:
- 1 if the file exists, 0 if the file doesn't exist, -1 if the file system is not responding properly
flush buffer to file
- Returns:
- success
Implements File.
Indicates if the file is currently open.
- Returns:
- true if the file is open, false otherwise
Implements File.
Get the file length.
- Returns:
- The file length up to the maximum supported 4Gb.
Implements File.
Get current location in file.
- Returns:
- Offset in bytes
Implements File.
Open the file.
- Returns:
- true if the file is open, false otherwise
bool File_dummy::read |
( |
uint8_t __attribute__((unused))* |
data, |
|
|
uint32_t __attribute__((unused)) |
size |
|
) |
| [inline] |
Read from the file.
- Parameters:
-
data | Caller supplied buffer to write to. |
size | The number of bytes to attempt to read. |
- Returns:
- success
bool File_dummy::seek |
( |
int32_t __attribute__((unused)) |
offset, |
|
|
file_seekfrom_t __attribute__((unused)) |
origin |
|
) |
| [inline] |
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.
- Parameters:
-
offset | The distance to move from the origin_ parameter. |
origin | One of the SeekFrom enumeration. |
- Returns:
- success
bool File_dummy::write |
( |
const uint8_t __attribute__((unused))* |
data, |
|
|
uint32_t __attribute__((unused)) |
size |
|
) |
| [inline] |
Write to the file.
- Parameters:
-
data | The buffer to write. |
size | The number of bytes to write. |
- Returns:
- success
The documentation for this class was generated from the following file: