Nui
|
Do note that the use of this class is inefficient. More...
#include <file.hpp>
Public Member Functions | |
~AsyncFile () | |
void | tellg (std::function< void(int32_t)> cb) const |
void | tellp (std::function< void(int32_t)> cb) const |
void | seekg (int32_t pos, std::function< void()> cb, std::ios_base::seekdir dir=std::ios_base::beg) |
void | seekp (int32_t pos, std::function< void()> cb, std::ios_base::seekdir dir=std::ios_base::beg) |
void | read (int32_t size, std::function< void(std::string &&)> cb) |
void | readAll (std::function< void(std::string &&)> cb) |
void | write (std::string const &data, std::function< void()> cb) |
Friends | |
void | openFile (char const *filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen) |
void | openFile (std::string const &filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen) |
void | openFile (std::filesystem::path const &filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen) |
Do note that the use of this class is inefficient.
Prefer implementing your file logic on the backend and pass functions with broader scope through to the frontend.
Nui::AsyncFile::~AsyncFile | ( | ) |
void Nui::AsyncFile::read | ( | int32_t | size, |
std::function< void(std::string &&)> | cb | ||
) |
void Nui::AsyncFile::readAll | ( | std::function< void(std::string &&)> | cb | ) |
void Nui::AsyncFile::seekg | ( | int32_t | pos, |
std::function< void()> | cb, | ||
std::ios_base::seekdir | dir = std::ios_base::beg |
||
) |
void Nui::AsyncFile::seekp | ( | int32_t | pos, |
std::function< void()> | cb, | ||
std::ios_base::seekdir | dir = std::ios_base::beg |
||
) |
void Nui::AsyncFile::tellg | ( | std::function< void(int32_t)> | cb | ) | const |
void Nui::AsyncFile::tellp | ( | std::function< void(int32_t)> | cb | ) | const |
void Nui::AsyncFile::write | ( | std::string const & | data, |
std::function< void()> | cb | ||
) |
|
friend |
|
friend |
|
friend |