MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / getFileData

Method getFileData

src/server/gui/core/resources/ResourceManager.cpp:54–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54const ResourceData ResourceManager::getFileData(const std::string& path) const
55{
56 //check if its a resource
57 const std::string respath = getResourcePath(path);
58
59 if (Utils::FileSystem::exists(respath)) {
60 ResourceData data = loadFile(respath);
61 return data;
62 }
63
64 //if the file doesn't exist, return an "empty" ResourceData
65 LOG(LogInfo) << "Failed loading resource " << path << ".";
66 ResourceData data = {NULL, 0};
67 return data;
68}
69
70ResourceData ResourceManager::loadFile(const std::string& path) const
71{

Callers 3

getFaceForCharMethod · 0.80
loadMethod · 0.80
setIconFunction · 0.80

Calls 1

existsFunction · 0.85

Tested by

no test coverage detected