92 :
File(fs, name, buffer, logger),
93 FatFile(fs, name, buffer, logger),
97 PropWare::ErrorCode
open () {
98 PropWare::ErrorCode err;
99 uint16_t fileEntryOffset = 0;
102 if ((err = this->find(this->
get_name(), &fileEntryOffset)))
107 check_errors(this->open_existing_file(fileEntryOffset));
113 PropWare::ErrorCode err;
116 check_errors(this->load_sector_under_ptr());
119 const uint16_t bufferOffset = (uint16_t) (this->m_ptr % this->m_driver->get_sector_size());
120 c = this->m_buf->buf[bufferOffset];
Generic definitions and functions for the Parallax Propeller.
A read-only file interface.
PropWare::ErrorCode safe_get_char(char &c)
Read a character from the file.
A generic interface for all files on the FAT 16/32 filesystem.
const PropWare::Printer pwOut
Most common use of printing in PropWare applications (not thread safe; see PropWare::pwSyncOut for mu...
Container class that has formatting methods for human-readable output. This class can be constructed ...
PropWare::ErrorCode open()
Open the file.
FatFileReader(FatFS &fs, const char name[], BlockStorage::Buffer *buffer=NULL, const Printer &logger=pwOut)
Construct a new file instance.
const char * get_name() const
Determine the name of a file.
Basic file interface for opening and closing files.
In-memory buffer containing a single block of data.
Read a file on a FAT 16 or FAT 32 storage device.