MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / open

Method open

framework/physfs_fs.cpp:277–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275FileSystem::~FileSystem() = default;
276
277IFile 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
299std::list<UString> FileSystem::enumerateDirectory(const UString &basePath,
300 const UString &extension) const

Callers 15

runScriptMethod · 0.80
loadImagePackMethod · 0.80
loadAnimationPackMethod · 0.80
dumpLofTempsFunction · 0.80
extractAgentTypesMethod · 0.80
extractImagePackMethod · 0.80
extractCityMapMethod · 0.80
extractAgentEquipmentMethod · 0.80
extractMapSectorsMethod · 0.80
extractBuildingsMethod · 0.80

Calls 3

to_lowerFunction · 0.85
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected