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

Method scan

source/base/StarAssets.cpp:436–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436StringList Assets::scan(String const& suffix) const {
437 if (suffix.beginsWith(".") && !suffix.substr(1).hasChar('.')) {
438 return scanExtension(suffix).values();
439 } else if (suffix.empty()) {
440 return m_files.keys();
441 } else {
442 StringList result;
443 for (auto const& fileEntry : m_files) {
444 String const& file = fileEntry.first;
445 if (file.endsWith(suffix, String::CaseInsensitive))
446 result.append(file);
447 }
448
449 return result;
450 }
451}
452
453StringList Assets::scan(String const& prefix, String const& suffix) const {
454 StringList result;

Callers 3

DungeonDefinitionsMethod · 0.45
VersioningDatabaseMethod · 0.45
makeRootCallbacksMethod · 0.45

Calls 8

beginsWithMethod · 0.45
hasCharMethod · 0.45
substrMethod · 0.45
valuesMethod · 0.45
emptyMethod · 0.45
keysMethod · 0.45
endsWithMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected