HDK
|
#include <filesystem.h>
Public Types | |
enum | Mode { Closed = 0, Read = 'r', Write = 'w' } |
Public Member Functions | |
IOProxy () | |
IOProxy (string_view filename, Mode mode) | |
IOProxy (const std::wstring &filename, Mode mode) | |
virtual | ~IOProxy () |
virtual const char * | proxytype () const =0 |
virtual void | close () |
virtual bool | opened () const |
virtual int64_t | tell () |
virtual bool | seek (int64_t offset) |
virtual size_t | read (void *buf, size_t size) |
virtual size_t | write (const void *buf, size_t size) |
virtual size_t | pread (void *buf, size_t size, int64_t offset) |
virtual size_t | pwrite (const void *buf, size_t size, int64_t offset) |
virtual size_t | size () const |
virtual void | flush () const |
Mode | mode () const |
const std::string & | filename () const |
template<class T > | |
size_t | read (span< T > buf) |
template<class T > | |
size_t | write (span< T > buf) |
size_t | write (string_view buf) |
bool | seek (int64_t offset, int origin) |
std::string | error () const |
void | error (string_view e) |
Protected Attributes | |
std::string | m_filename |
int64_t | m_pos = 0 |
Mode | m_mode = Closed |
std::string | m_error |
Proxy class for I/O. This provides a simplified interface for file I/O that can have custom overrides. All char-based filenames are assumed to be UTF-8 encoded.
Definition at line 384 of file filesystem.h.
Enumerator | |
---|---|
Closed | |
Read | |
Write |
Definition at line 386 of file filesystem.h.
|
inline |
Definition at line 387 of file filesystem.h.
|
inline |
Definition at line 388 of file filesystem.h.
|
inline |
Definition at line 390 of file filesystem.h.
|
inlinevirtual |
Definition at line 392 of file filesystem.h.
|
inlinevirtual |
Reimplemented in Filesystem::IOFile.
Definition at line 394 of file filesystem.h.
std::string Filesystem::IOProxy::error | ( | ) | const |
void Filesystem::IOProxy::error | ( | string_view | e | ) |
|
inline |
Definition at line 408 of file filesystem.h.
|
inlinevirtual |
Reimplemented in Filesystem::IOFile.
Definition at line 405 of file filesystem.h.
|
inline |
Definition at line 407 of file filesystem.h.
|
inlinevirtual |
Definition at line 395 of file filesystem.h.
|
virtual |
Reimplemented in Filesystem::IOMemReader, and Filesystem::IOFile.
|
pure virtual |
Implemented in Filesystem::IOMemReader, Filesystem::IOVecOutput, and Filesystem::IOFile.
|
virtual |
Reimplemented in Filesystem::IOVecOutput, and Filesystem::IOFile.
|
virtual |
Reimplemented in Filesystem::IOMemReader, and Filesystem::IOFile.
|
inline |
Definition at line 409 of file filesystem.h.
|
inlinevirtual |
Reimplemented in Filesystem::IOMemReader, and Filesystem::IOFile.
Definition at line 397 of file filesystem.h.
|
inline |
Definition at line 418 of file filesystem.h.
|
inlinevirtual |
Reimplemented in Filesystem::IOMemReader, Filesystem::IOVecOutput, and Filesystem::IOFile.
Definition at line 404 of file filesystem.h.
|
inlinevirtual |
Definition at line 396 of file filesystem.h.
|
virtual |
Reimplemented in Filesystem::IOVecOutput, and Filesystem::IOFile.
|
inline |
Definition at line 412 of file filesystem.h.
|
inline |
Definition at line 415 of file filesystem.h.
|
protected |
Definition at line 432 of file filesystem.h.
|
protected |
Definition at line 429 of file filesystem.h.
Definition at line 431 of file filesystem.h.
|
protected |
Definition at line 430 of file filesystem.h.