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

Function parseAssetSource

source/utility/tileset_updater.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50Maybe<pair<String, String>> parseAssetSource(String const& source) {
51 if (!File::isDirectory(source))
52 return {};
53
54 String sourcePath = source.trimEnd("/\\");
55 String sourceName = sourcePath.splitAny("/\\").last();
56
57 return make_pair(sourceName, sourcePath);
58}
59
60String tilesetExportDir(String const& sourcePath, String const& sourceName) {
61 return StringList{sourcePath, AssetsTilesetDirectory, sourceName}.join("/");

Callers 4

exportTilesetMethod · 0.85
imageDirNameMethod · 0.85
defineAssetSourceMethod · 0.85
exportTilesetsMethod · 0.85

Calls 3

trimEndMethod · 0.80
splitAnyMethod · 0.80
lastMethod · 0.45

Tested by

no test coverage detected