| 52 | } |
| 53 | |
| 54 | const 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 | |
| 70 | ResourceData ResourceManager::loadFile(const std::string& path) const |
| 71 | { |
no test coverage detected