7 #include "packager/file/file.h"
24 bool Close()
override;
25 int64_t
Read(
void* buffer, uint64_t length)
override;
26 int64_t
Write(
const void* buffer, uint64_t length)
override;
27 int64_t
Size()
override;
28 bool Flush()
override;
29 bool Seek(uint64_t position)
override;
30 bool Tell(uint64_t* position)
override;
44 std::string file_mode_;
CallbackFile(const char *file_name, const char *mode)
bool Seek(uint64_t position) override
int64_t Read(void *buffer, uint64_t length) override
int64_t Write(const void *buffer, uint64_t length) override
bool Open() override
Internal open. Should not be used directly.
bool Tell(uint64_t *position) override
Define an abstract file interface.
const std::string & file_name() const
All the methods that are virtual are virtual for mocking.