7 #ifndef PACKAGER_FILE_LOCAL_FILE_H_
8 #define PACKAGER_FILE_LOCAL_FILE_H_
14 #include "packager/base/compiler_specific.h"
15 #include "packager/file/file.h"
29 bool Close()
override;
30 int64_t
Read(
void* buffer, uint64_t length)
override;
31 int64_t
Write(
const void* buffer, uint64_t length)
override;
32 int64_t
Size()
override;
33 bool Flush()
override;
34 bool Seek(uint64_t position)
override;
35 bool Tell(uint64_t* position)
override;
41 static bool Delete(
const char* file_name);
49 std::string file_mode_;
57 #endif // PACKAGER_FILE_LOCAL_FILE_H_
const std::string & file_name() const
bool Seek(uint64_t position) override
Define an abstract file interface.
static bool Delete(const char *file_name)
Implement LocalFile which deals with local storage.
int64_t Read(void *buffer, uint64_t length) override
bool Open() override
Internal open. Should not be used directly.
int64_t Write(const void *buffer, uint64_t length) override
bool Tell(uint64_t *position) override
LocalFile(const char *file_name, const char *mode)