MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getEntry

Method getEntry

valdi/src/valdi/runtime/Resources/Bundle.cpp:135–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135Result<BytesView> Bundle::getEntry(const StringBox& path) {
136 std::lock_guard<std::recursive_mutex> guard(_mutex);
137
138 auto archiveResult = lockFreeLoadEntriesIfNeeded();
139 if (!archiveResult) {
140 return archiveResult.moveError();
141 }
142
143 const auto& it = _entryByPath.find(path);
144 if (it == _entryByPath.end()) {
145 return Error(STRING_FORMAT("No item named '{}' in module '{}', available items are: {}",
146 path,
147 _name,
148 StringBox::join(_allEntryPaths, ", ")));
149 }
150
151 return it->second;
152}
153
154bool Bundle::hasEntry(const StringBox& path) {
155 std::lock_guard<std::recursive_mutex> guard(_mutex);

Callers 13

registerAssetArchivesFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
getModuleEntryMethod · 0.45
getRetainCountMethod · 0.45
newLocalRefMethod · 0.45
initializeBundleMethod · 0.45
getBundleMethod · 0.45
preprocessMethod · 0.45
runtimeGetModuleEntryMethod · 0.45

Calls 3

endMethod · 0.65
ErrorInterface · 0.50
findMethod · 0.45

Tested by 3

registerAssetArchivesFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36