| 72 | } |
| 73 | |
| 74 | void 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 | |
| 90 | std::string MapResource::getAbsoluteResourcePath() |
| 91 | { |
nothing calls this directly
no test coverage detected