21 std::ios_base::openmode mode,
22 std::function<
void(std::optional<AsyncFile>&&)> onOpen);
24 std::string
const& filename,
25 std::ios_base::openmode mode,
26 std::function<
void(std::optional<AsyncFile>&&)> onOpen);
28 std::filesystem::path
const& filename,
29 std::ios_base::openmode mode,
30 std::function<
void(std::optional<AsyncFile>&&)> onOpen);
35 void tellg(std::function<
void(int32_t)> cb)
const;
36 void tellp(std::function<
void(int32_t)> cb)
const;
37 void seekg(int32_t pos, std::function<
void()> cb, std::ios_base::seekdir dir = std::ios_base::beg);
38 void seekp(int32_t pos, std::function<
void()> cb, std::ios_base::seekdir dir = std::ios_base::beg);
40 void read(int32_t size, std::function<
void(std::string&&)> cb);
41 void readAll(std::function<
void(std::string&&)> cb);
42 void write(std::string
const& data, std::function<
void()> cb);
52 std::ios_base::openmode mode,
53 std::function<
void(std::optional<AsyncFile>&&)> onOpen);
55 std::string
const& filename,
56 std::ios_base::openmode mode,
57 std::function<
void(std::optional<AsyncFile>&&)> onOpen);
59 std::filesystem::path
const& filename,
60 std::ios_base::openmode mode,
61 std::function<
void(std::optional<AsyncFile>&&)> onOpen);
Do note that the use of this class is inefficient.
Definition: file.hpp:17
~AsyncFile()
Definition: file.cpp:15
void read(int32_t size, std::function< void(std::string &&)> cb)
Definition: file.cpp:45
void readAll(std::function< void(std::string &&)> cb)
Definition: file.cpp:50
void seekg(int32_t pos, std::function< void()> cb, std::ios_base::seekdir dir=std::ios_base::beg)
Definition: file.cpp:33
void write(std::string const &data, std::function< void()> cb)
Definition: file.cpp:55
void tellg(std::function< void(int32_t)> cb) const
Definition: file.cpp:23
friend void openFile(char const *filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen)
Definition: file.cpp:61
void tellp(std::function< void(int32_t)> cb) const
Definition: file.cpp:28
void seekp(int32_t pos, std::function< void()> cb, std::ios_base::seekdir dir=std::ios_base::beg)
Definition: file.cpp:39
Definition: file_dialog.hpp:6
void openFile(char const *filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen)
Definition: file.cpp:61