Minetest  5.4.0
FileCache Class Reference

#include <filecache.h>

+ Collaboration diagram for FileCache:

Public Member Functions

 FileCache (const std::string &dir)
 
bool update (const std::string &name, const std::string &data)
 
bool load (const std::string &name, std::ostream &os)
 
bool exists (const std::string &name)
 

Private Member Functions

bool loadByPath (const std::string &path, std::ostream &os)
 
bool updateByPath (const std::string &path, const std::string &data)
 

Private Attributes

std::string m_dir
 

Constructor & Destructor Documentation

◆ FileCache()

FileCache::FileCache ( const std::string &  dir)
inline

Member Function Documentation

◆ exists()

bool FileCache::exists ( const std::string &  name)

References DIR_DELIM, and m_dir.

Referenced by clientMediaUpdateCache().

+ Here is the caller graph for this function:

◆ load()

bool FileCache::load ( const std::string &  name,
std::ostream &  os 
)

References DIR_DELIM, loadByPath(), and m_dir.

Referenced by ClientMediaDownloader::initialStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadByPath()

bool FileCache::loadByPath ( const std::string &  path,
std::ostream &  os 
)
private

References errorstream, and verbosestream.

Referenced by load().

+ Here is the caller graph for this function:

◆ update()

bool FileCache::update ( const std::string &  name,
const std::string &  data 
)

References DIR_DELIM, m_dir, and updateByPath().

Referenced by ClientMediaDownloader::checkAndLoad(), and clientMediaUpdateCache().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateByPath()

bool FileCache::updateByPath ( const std::string &  path,
const std::string &  data 
)
private

References errorstream.

Referenced by update().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_dir

std::string FileCache::m_dir
private

Referenced by exists(), load(), and update().


The documentation for this class was generated from the following files: