11 #ifndef _SMING_CORE_DATA_GDB_FILE_STREAM_H_ 12 #define _SMING_CORE_DATA_GDB_FILE_STREAM_H_ 14 #include "ReadWriteStream.h" 15 #include "FileSystem.h" 33 open(fileName, openFlags);
53 size_t write(
const uint8_t* buffer,
size_t size)
override;
59 bool seek(
int len)
override;
size_t getPos() const
Get the offset of cursor from beginning of data.
Definition: GdbFileStream.h:96
GdbFileStream(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Create a file stream.
Definition: GdbFileStream.h:31
bool fileExist() const
Determine if file exists.
Definition: GdbFileStream.h:78
bool isFinished() override
Check if all data has been read.
Definition: GdbFileStream.h:62
bool isValid() const override
Determine if the stream object contains valid data.
Definition: GdbFileStream.h:88
GDB File stream class to provide access to host files whilst running under debugger.
Definition: GdbFileStream.h:21
bool seek(int len) override
Move read cursor.
String getFileName() const
Filename of file stream is attached to.
Definition: GdbFileStream.h:70
The string class.
Definition: WString.h:104
size_t write(const uint8_t *buffer, size_t size) override
Write chars to stream.
Read only file.
Definition: FileSystem.h:26
int getLastError()
determine if an error occurred during operation
Definition: GdbFileStream.h:114
bool open(const String &fileName, FileOpenFlags openFlags=eFO_ReadOnly)
Open a file and attach this stream object to it.
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
int available() override
Return the total length of the stream.
Definition: GdbFileStream.h:104
String id() const override
Returns unique id of the resource.
Base class for read/write stream.
Definition: ReadWriteStream.h:23
String getName() const override
Returns name of the resource.
Definition: GdbFileStream.h:83
FileOpenFlags
File open flags.
Definition: FileSystem.h:25