#include <filecache.h>
Collaboration diagram for FileCache:Public Member Functions | |
| FileCache (const std::string &dir) | |
| bool | update (const std::string &name, std::string_view data) |
| bool | load (const std::string &name, std::ostream &os) |
| bool | exists (const std::string &name) |
| bool | updateCopyFile (const std::string &name, const std::string &src_path) |
Private Member Functions | |
| void | createDir () |
| bool | loadByPath (const std::string &path, std::ostream &os) |
| bool | updateByPath (const std::string &path, std::string_view data) |
Private Attributes | |
| std::string | m_dir |
|
inline |
|
private |
References fs::CreateAllDirs(), errorstream, and m_dir.
Referenced by updateByPath(), and updateCopyFile().
Here is the call graph for this function:
Here is the caller graph for this function:| bool FileCache::exists | ( | const std::string & | name | ) |
References DIR_DELIM, m_dir, and fs::PathExists().
Referenced by clientMediaUpdateCache(), and clientMediaUpdateCacheCopy().
Here is the call graph for this function:
Here is the caller graph for this function:| bool FileCache::load | ( | const std::string & | name, |
| std::ostream & | os ) |
References DIR_DELIM, loadByPath(), and m_dir.
Referenced by IClientMediaDownloader::tryLoadFromCache().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References errorstream, and open_ifstream().
Referenced by load().
Here is the call graph for this function:
Here is the caller graph for this function:| bool FileCache::update | ( | const std::string & | name, |
| std::string_view | data ) |
References DIR_DELIM, m_dir, and updateByPath().
Referenced by IClientMediaDownloader::checkAndLoad(), and clientMediaUpdateCache().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References createDir(), and open_ofstream().
Referenced by update().
Here is the call graph for this function:
Here is the caller graph for this function:| bool FileCache::updateCopyFile | ( | const std::string & | name, |
| const std::string & | src_path ) |
References fs::CopyFileContents(), createDir(), DIR_DELIM, and m_dir.
Referenced by clientMediaUpdateCacheCopy().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by createDir(), exists(), load(), update(), and updateCopyFile().