MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / constructPaths

Method constructPaths

radiantcore/map/MapResource.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void MapResource::constructPaths(const std::string& resourcePath)
75{
76 // Since the resource path can contain dots like this ".."
77 // pass the filename part only to getExtension().
78 _extension = os::getExtension(os::getFilename(resourcePath));
79
80 // Try to find a folder part of the VFS and use that as base path
81 // Will result to an empty string if the path is outside the VFS
82 _path = rootPath(resourcePath);
83
84 // Try to create a relative path, based on the VFS directories
85 // If no relative path can be deducted, use the absolute resourcePath
86 // in unmodified form.
87 _name = os::getRelativePath(resourcePath, _path);
88}
89
90std::string MapResource::getAbsoluteResourcePath()
91{

Callers

nothing calls this directly

Calls 4

getExtensionFunction · 0.85
getFilenameFunction · 0.85
getRelativePathFunction · 0.85
rootPathFunction · 0.70

Tested by

no test coverage detected