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