MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / toFilesystem

Method toFilesystem

source/base/StarDirectoryAssetSource.cpp:53–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53String DirectoryAssetSource::toFilesystem(String const& path) const {
54 if (!path.beginsWith("/"))
55 throw AssetSourceException::format("Asset path '{}' must be absolute in DirectoryAssetSource::toFilesystem", path);
56 else
57 return File::relativeTo(m_baseDirectory, File::convertDirSeparators(path.substr(1)));
58}
59
60void DirectoryAssetSource::setMetadata(JsonObject metadata) {
61 if (metadata != m_metadata) {

Callers 1

buildMethod · 0.80

Calls 3

formatFunction · 0.50
beginsWithMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected