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

Method setEntry

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

Source from the content-addressed store, hash-verified

159}
160
161void Bundle::setEntry(const StringBox& path, const BytesView& data) {
162 std::lock_guard<std::recursive_mutex> guard(_mutex);
163
164 const auto& it = _entryByPath.find(path);
165 if (it == _entryByPath.end()) {
166 _allEntryPaths.emplace_back(path);
167 }
168 _entryByPath[path] = data;
169}
170
171Result<JavaScriptFile> Bundle::getJs(const StringBox& jsPath) {
172 std::lock_guard<std::recursive_mutex> guard(_mutex);

Callers 1

updateResourcesMethod · 0.80

Calls 2

endMethod · 0.65
findMethod · 0.45

Tested by

no test coverage detected