| 275 | FileSystem::~FileSystem() = default; |
| 276 | |
| 277 | IFile FileSystem::open(const UString &path) const |
| 278 | { |
| 279 | IFile f; |
| 280 | |
| 281 | auto lowerPath = to_lower(path); |
| 282 | if (path != lowerPath) |
| 283 | { |
| 284 | LogError("Path \"%s\" contains CAPITAL - cut it out!", path); |
| 285 | } |
| 286 | |
| 287 | if (!PHYSFS_exists(path.c_str())) |
| 288 | { |
| 289 | LogInfo("Failed to find \"%s\"", path); |
| 290 | LogAssert(!f); |
| 291 | return f; |
| 292 | } |
| 293 | f.f.reset(new PhysfsIFileImpl(path)); |
| 294 | f.rdbuf(dynamic_cast<PhysfsIFileImpl *>(f.f.get())); |
| 295 | LogInfo("Loading \"%s\" from \"%s\"", path, f.systemPath()); |
| 296 | return f; |
| 297 | } |
| 298 | |
| 299 | std::list<UString> FileSystem::enumerateDirectory(const UString &basePath, |
| 300 | const UString &extension) const |
no test coverage detected