|
Evo C++ Library v0.5.1
|
#include <evo/impl/sysio.h>

File I/O device (used internally).
Public Types | |
| typedef ExceptionFileIn | ExceptionInT |
| Input exception type for file stream. More... | |
| typedef ExceptionFileOut | ExceptionOutT |
| Output exception type for file stream. More... | |
| typedef int | Handle |
| System file handle. More... | |
Public Member Functions | |
| IoFile () | |
| Constructor. More... | |
| ~IoFile () | |
| Destructor. More... | |
| void | close () |
| Handle | detach () |
| Detach and return file handle. More... | |
| bool | isopen () const |
| Get whether file is open. More... | |
| Error | open (const char *path, Open mode, int perm=DEFPERM) |
| Open file for access. More... | |
| Error | open_dup (Handle src, Handle target=INVALID) |
| Open duplicate handle from source handle. More... | |
| ulongl | pos (Error &err) |
| Get current file position. More... | |
| ulong | read (Error &err, void *buf, ulong size, ulong timeout_ms=0) |
| ulongl | seek (Error &err, ulongl offset, Seek start=sBegin) |
| Seek to file position. More... | |
| ulong | write (Error &err, const void *buf, ulong size, ulong timeout_ms=0) |
Static Public Member Functions | |
| static Error | mkdir (const char *path, int perm=0) |
| static Error | rm (const char *path) |
| static Error | rmdir (const char *path) |
Public Attributes | |
| bool | autoresume |
| Whether to auto-resume I/O operation after signal received [Linux/Unix]. More... | |
| Handle | handle |
| System handle/descriptor. More... | |
Static Public Attributes | |
| static const int | DEFPERM = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH |
| Default permissions (used when creating new file). More... | |
| static const Handle | INVALID = -1 |
| Invalid handle value. More... | |
| static const int | READONLY = S_IRUSR | S_IRGRP | S_IROTH |
| Read-only permissions. More... | |
| static const bool | STREAM_SEEKABLE = true |
| File streams are seekable with Stream. More... | |
| static const int | USER_RD = S_IRUSR |
| User read-only permissions. More... | |
| static const int | USER_RW = S_IRUSR | S_IWUSR |
| User read-write permissions. More... | |
| typedef ExceptionFileIn ExceptionInT |
Input exception type for file stream.
| typedef ExceptionFileOut ExceptionOutT |
Output exception type for file stream.
| typedef int Handle |
System file handle.
|
inline |
Constructor.
|
inline |
|
inline |
Get whether file is open.
|
inlinestatic |
Open file for access.
| path | File path to use |
| mode | Access mode to use |
| perm | Permissions for new files [Linux/Unix] |
Open duplicate handle from source handle.
| src | Source handle to duplicate |
| target | Target handle to open under (closed first, if open), INVALID to ignore and open a new handle |
|
inline |
Get current file position.
| err | Stores ENone on success, error code on error [out] |
|
inline |
|
inlinestatic |
|
inlinestatic |
Seek to file position.
| err | Stores ENone on success, error code on error [out] |
| offset | Offset from start to seek to |
| start | Start position to seek from |
|
inline |
| bool autoresume |
Whether to auto-resume I/O operation after signal received [Linux/Unix].
|
static |
Default permissions (used when creating new file).
| Handle handle |
System handle/descriptor.
|
static |
Invalid handle value.
|
static |
Read-only permissions.
|
static |
User read-only permissions.
|
static |
User read-write permissions.
1.8.13