mbed-drivers
|
#include <FileHandle.h>
Public Member Functions | |
virtual ssize_t | write (const void *buffer, size_t length)=0 |
virtual int | close ()=0 |
virtual ssize_t | read (void *buffer, size_t length)=0 |
virtual int | isatty ()=0 |
virtual off_t | lseek (off_t offset, int whence)=0 |
virtual int | fsync ()=0 |
virtual off_t | flen () |
An OO equivalent of the internal FILEHANDLE variable and associated sys* functions.
FileHandle is an abstract class, needing at least sys_write and sys_read to be implmented for a simple interactive device.
No one ever directly tals to/instanciates a FileHandle - it gets created by FileSystem, and wrapped up by stdio.
|
pure virtual |
|
pure virtual |
Flush any buffers associated with the FileHandle, ensuring it is up to date on disk
Implemented in mbed::Stream.
|
pure virtual |
Check if the handle is for a interactive terminal device. If so, line buffered behaviour is used by default
Implemented in mbed::Stream.
|
pure virtual |
Move the file position to a given offset from a given location.
offset | The offset from whence to move to |
whence | SEEK_SET for the start of the file, SEEK_CUR for the current file position, or SEEK_END for the end of the file. |
Implemented in mbed::Stream.
|
pure virtual |
Function read Reads the contents of the file into a buffer
buffer | the buffer to read in to |
length | the number of characters to read |
Implemented in mbed::Stream.
|
pure virtual |
Write the contents of a buffer to the file
buffer | the buffer to write from |
length | the number of characters to write |
Implemented in mbed::Stream.