FileStream.h
Go to the documentation of this file.
int available() override
Return the maximum bytes available to read, from current position.
Definition: FileStream.h:131
void attach(file_t file, size_t size)
Attach this stream object to an open file handle.
bool attach(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Definition: FileStream.h:48
int read() override
Read one character and moves the stream pointer.
Definition: FileStream.h:72
bool open(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Open a file and attach this stream object to it.
int length()
Return the total length of the stream.
Definition: DataSourceStream.h:134
bool isValid() const override
Determine if the stream object contains valid data.
Definition: FileStream.h:107
int getLastError()
determine if an error occurred during operation
Definition: FileStream.h:141
String getName() const override
Returns name of the resource.
Definition: FileStream.h:102
FileStream(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Create a file stream.
Definition: FileStream.h:31
StreamType getStreamType() const override
Get the stream type.
Definition: FileStream.h:65
bool isFinished() override
Check if all data has been read.
Definition: FileStream.h:84
size_t getPos() const
Get the offset of cursor from beginning of data.
Definition: FileStream.h:115
size_t readBytes(char *buffer, size_t length) override
Read chars from stream into buffer.
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
1.8.13