PropWare
C++ objects and CMake build system for Parallax Propeller
|
A generic interface for all files on the FAT 16/32 filesystem. More...
#include <fatfile.h>
Public Types | |
enum | ErrorCode { NO_ERROR = 0, BEG_ERROR = Filesystem::END_ERROR + 1, ENTRY_NOT_FILE = BEG_ERROR, FILENAME_NOT_FOUND, END_ERROR = FILENAME_NOT_FOUND } |
enum | SeekDir { BEG, CUR, END } |
Public Member Functions | |
const char * | get_name () const |
Determine the name of a file. More... | |
bool | exists () const |
Determine if a file exists (file does not have to be open) More... | |
bool | exists (PropWare::ErrorCode &err) const |
virtual PropWare::ErrorCode | open ()=0 |
Open the file. More... | |
virtual PropWare::ErrorCode | close () |
Close a file - a required step in any workflow that includes opening a file. More... | |
virtual PropWare::ErrorCode | flush ()=0 |
Flush any modified data back to the SD card. More... | |
int32_t | get_length () const |
Return the number of bytes (characters) in the file. | |
int32_t | tell () const |
Obtain the value of the file position indicator. More... | |
PropWare::ErrorCode | seek (const int32_t offset, const SeekDir way) |
Sets the position of the next character to be read or written. More... | |
PropWare::ErrorCode | seek (const int32_t position) |
Static Public Attributes | |
static const unsigned int | MAX_FILENAME_LENGTH = 32 |
A generic interface for all files on the FAT 16/32 filesystem.
|
inherited |
|
virtualinherited |
Close a file - a required step in any workflow that includes opening a file.
Definition at line 74 of file file.h.
bool PropWare::FatFile::exists | ( | ) | const |
bool PropWare::FatFile::exists | ( | PropWare::ErrorCode & | err | ) | const |
|
pure virtualinherited |
Flush any modified data back to the SD card.
Implemented in PropWare::FatFileWriter, and PropWare::FileReader.
const char* PropWare::FatFile::get_name | ( | ) | const |
|
pure virtualinherited |
Open the file.
Implemented in PropWare::FatFileReader, and PropWare::FatFileWriter.
|
inherited |
Sets the position of the next character to be read or written.
[in] | offset | Offset value, relative to the way parameter |
[in] | way | Starting position for the movement and direction of movement |
Definition at line 112 of file file.h.
|
inherited |
|
inherited |