IFS/FileStream.h
Go to the documentation of this file.
int read() override
Read one character and moves the stream pointer.
Definition: IFS/FileStream.h:66
int length()
Return the total length of the stream.
Definition: DataSourceStream.h:134
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: IFS/FileStream.h:120
bool isFinished() override
Check if all data has been read.
Definition: IFS/FileStream.h:78
bool check(int res)
Check file operation result and note error code.
Definition: FsBase.h:76
bool fileExist() const
Determine if file exists.
Definition: IFS/FileStream.h:92
Definition: DirectoryTemplate.h:36
int available() override
Return the maximum bytes available to read, from current position.
Definition: IFS/FileStream.h:128
size_t getPos() const
Get the offset of cursor from beginning of data.
Definition: IFS/FileStream.h:112
void attach(FileHandle file, size_t size)
Attach this stream object to an open file handle.
bool isValid() const override
Determine if the stream object contains valid data.
Definition: IFS/FileStream.h:104
bool open(const String &fileName, IFS::OpenFlags openFlags=OpenFlag::Read)
Open a file by path, and attach this stream object to it.
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.
StreamType getStreamType() const override
Get the stream type.
Definition: IFS/FileStream.h:59
String getName() const override
Returns name of the resource.
Definition: IFS/FileStream.h:97
bool truncate()
Truncate file at current position.
Definition: IFS/FileStream.h:144
int seekFrom(int offset, SeekOrigin origin) override
Change position in stream.
Definition: FsBase.h:33