mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Server pushing media at runtime (#9961)
This commit is contained in:
parent
982a030f33
commit
2424dfe007
16 changed files with 263 additions and 85 deletions
|
@ -82,8 +82,16 @@ bool FileCache::update(const std::string &name, const std::string &data)
|
|||
std::string path = m_dir + DIR_DELIM + name;
|
||||
return updateByPath(path, data);
|
||||
}
|
||||
|
||||
bool FileCache::load(const std::string &name, std::ostream &os)
|
||||
{
|
||||
std::string path = m_dir + DIR_DELIM + name;
|
||||
return loadByPath(path, os);
|
||||
}
|
||||
|
||||
bool FileCache::exists(const std::string &name)
|
||||
{
|
||||
std::string path = m_dir + DIR_DELIM + name;
|
||||
std::ifstream fis(path.c_str(), std::ios_base::binary);
|
||||
return fis.good();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue