21 LocalFile(std::string filename,
const char* mode);
23 void read(std::span<uint8_t> buffer)
override;
24 void write(std::span<const uint8_t> buffer)
override;
25#if HAVE_MMAP || defined _WIN32
26 [[nodiscard]] std::span<const uint8_t>
mmap()
override;
29 [[nodiscard]]
size_t getSize()
override;
30 void seek(
size_t pos)
override;
31 [[nodiscard]]
size_t getPos()
override;
35 void flush()
override;
36 [[nodiscard]]
const std::string&
getURL()
const override;
38 [[nodiscard]]
bool isReadOnly()
const override;
47 uint8_t* mmem =
nullptr;
50 uint8_t* mmem =
nullptr;
51 HANDLE hMmap =
nullptr;
53 std::optional<PreCacheFile> cache;
54 bool readOnly =
false;
virtual std::span< const uint8_t > mmap()
virtual void truncate(size_t size)
time_t getModificationDate() override
void write(std::span< const uint8_t > buffer) override
void read(std::span< uint8_t > buffer) override
void seek(size_t pos) override
bool isReadOnly() const override
std::string getLocalReference() override
const std::string & getURL() const override
size_t getSize() override
std::unique_ptr< FILE, FClose > FILE_t
This file implemented 3 utility functions: