|
| Stream (const char *name=NULL) |
|
int | putc (int c) |
|
int | puts (const char *s) |
|
int | getc () |
|
char * | gets (char *s, int size) |
|
int | printf (const char *format,...) |
|
int | scanf (const char *format,...) |
|
int | vprintf (const char *format, std::va_list args) |
|
int | vscanf (const char *format, std::va_list args) |
|
| operator std::FILE * () |
|
| FileLike (const char *name) |
|
| FileBase (const char *name, PathType t) |
|
const char * | getName (void) |
|
PathType | getPathType (void) |
|
|
virtual int | close () |
|
virtual ssize_t | write (const void *buffer, size_t length) |
|
virtual ssize_t | read (void *buffer, size_t length) |
|
virtual off_t | lseek (off_t offset, int whence) |
|
virtual int | isatty () |
|
virtual int | fsync () |
|
virtual off_t | flen () |
|
virtual int | _putc (int c)=0 |
|
virtual int | _getc ()=0 |
|
|
std::FILE * | _file |
|
FileBase * | _next |
|
const char * | _name |
|
PathType | _path_type |
|
|
static FileBase * | lookup (const char *name, unsigned int len) |
|
static FileBase * | get (int n) |
|
static FileBase * | _head = NULL |
|
int mbed::Stream::close |
( |
| ) |
|
|
protectedvirtual |
Close the file
- Returns
- Zero on success, -1 on error.
Implements mbed::FileHandle.
int mbed::Stream::fsync |
( |
| ) |
|
|
protectedvirtual |
Flush any buffers associated with the FileHandle, ensuring it is up to date on disk
- Returns
- 0 on success or un-needed, -1 on error
Implements mbed::FileHandle.
int mbed::Stream::isatty |
( |
| ) |
|
|
protectedvirtual |
Check if the handle is for a interactive terminal device. If so, line buffered behaviour is used by default
- Returns
- 1 if it is a terminal, 0 otherwise
Implements mbed::FileHandle.
off_t mbed::Stream::lseek |
( |
off_t |
offset, |
|
|
int |
whence |
|
) |
| |
|
protectedvirtual |
Move the file position to a given offset from a given location.
- Parameters
-
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. |
- Returns
- new file position on success, -1 on failure or unsupported
Implements mbed::FileHandle.
ssize_t mbed::Stream::read |
( |
void * |
buffer, |
|
|
size_t |
length |
|
) |
| |
|
protectedvirtual |
Function read Reads the contents of the file into a buffer
- Parameters
-
buffer | the buffer to read in to |
length | the number of characters to read |
- Returns
- The number of characters read (zero at end of file) on success, -1 on error.
Implements mbed::FileHandle.
ssize_t mbed::Stream::write |
( |
const void * |
buffer, |
|
|
size_t |
length |
|
) |
| |
|
protectedvirtual |
Write the contents of a buffer to the file
- Parameters
-
buffer | the buffer to write from |
length | the number of characters to write |
- Returns
- The number of characters written (possibly 0) on success, -1 on error.
Implements mbed::FileHandle.
The documentation for this class was generated from the following files: