27 #ifndef INCLUDED_FILE_CACHE
28 #define INCLUDED_FILE_CACHE
66 shared_ptr<u8>
Reserve(
size_t size);
82 void Add(
const VfsPath& pathname,
const shared_ptr<u8>& data,
size_t size,
size_t cost = 1);
101 bool Retrieve(
const VfsPath& pathname, shared_ptr<u8>& data,
size_t& size);
105 shared_ptr<Impl>
impl;
108 #endif // #ifndef INCLUDED_FILE_CACHE
bool Retrieve(const VfsPath &pathname, shared_ptr< u8 > &data, size_t &size)
Attempt to retrieve a file's contents from the file cache.
cache of file contents with support for zero-copy IO.
void Remove(const VfsPath &pathname)
Remove a file's contents from the cache (if it exists).
shared_ptr< u8 > Reserve(size_t size)
Reserve a chunk of the cache's memory region.
void Add(const VfsPath &pathname, const shared_ptr< u8 > &data, size_t size, size_t cost=1)
Add a file's contents to the cache.