Go to the documentation of this file.
13 if (mmapBuf.
empty()) {
19 std::swap(mmapBuf, tmpBuf);
34 if (newSize < oldSize) {
38 auto remaining = newSize - oldSize;
43 memset(buf, 0,
sizeof(buf));
46 write(buf, chunkSize);
47 remaining -= chunkSize;
void clear()
Free the allocated memory block and set the current size to 0.
constexpr vecN< N, T > min(const vecN< N, T > &x, const vecN< N, T > &y)
bool empty() const
No memory allocated?
virtual void seek(size_t pos)=0
size_t size(std::string_view utf8)
virtual size_t getSize()=0
virtual span< uint8_t > mmap()
virtual void write(const void *buffer, size_t num)=0
virtual std::string_view getOriginalName()
virtual void truncate(size_t size)
const T * data() const
Returns pointer to the start of the memory buffer.
virtual void read(void *buffer, size_t num)=0
virtual std::string getLocalReference()
This file implemented 3 utility functions:
virtual size_t getPos()=0
virtual const std::string & getURL() const =0
string_view getFilename(string_view path)
Returns the file portion of a path name.