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_;
bool Seek(uint64_t position) override
int64_t Write(const void *buffer, uint64_t length) override
const std::string & file_name() const
All the methods that are virtual are virtual for mocking.
bool Open() override
Internal open. Should not be used directly.
CallbackFile(const char *file_name, const char *mode)
Define an abstract file interface.
int64_t Read(void *buffer, uint64_t length) override
bool Tell(uint64_t *position) override