HostFileStream.h
Go to the documentation of this file.
bool truncate()
Truncate file at current position.
Definition: HostFileStream.h:120
size_t getPos() const
Get the offset of cursor from beginning of data.
Definition: HostFileStream.h:82
int seekFrom(int offset, unsigned origin) override
Change position in stream.
int getLastError()
determine if an error occurred during operation
Definition: HostFileStream.h:106
StreamType getStreamType() const override
Get the stream type.
Definition: HostFileStream.h:56
HostFileStream(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Create a file stream.
Definition: HostFileStream.h:34
bool isValid() const override
Determine if the stream object contains valid data.
Definition: HostFileStream.h:74
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
int available() override
Return the maximum bytes available to read, from current position.
Definition: HostFileStream.h:98
bool open(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Open a file and attach this stream object to it.
String getName() const override
Returns name of the resource.
Definition: HostFileStream.h:69
size_t write(const uint8_t *buffer, size_t size) override
Write chars to stream.
size_t getSize() const
Get the total file size.
Definition: HostFileStream.h:90