| 217 | } |
| 218 | |
| 219 | Result<BundleResourceContent> Bundle::getResourceContent(const StringBox& path) { |
| 220 | std::lock_guard<std::recursive_mutex> guard(_mutex); |
| 221 | const auto& it = _resourceContentByPath.find(path); |
| 222 | if (it != _resourceContentByPath.end()) { |
| 223 | return it->second; |
| 224 | } |
| 225 | |
| 226 | auto entryResult = getEntry(path); |
| 227 | if (!entryResult) { |
| 228 | return entryResult.moveError(); |
| 229 | } |
| 230 | |
| 231 | auto entry = entryResult.moveValue(); |
| 232 | return BundleResourceContent(entry); |
| 233 | } |
| 234 | |
| 235 | void Bundle::setResourceContent(const StringBox& path, const BundleResourceContent& resourceContent) { |
| 236 | std::lock_guard<std::recursive_mutex> guard(_mutex); |
nothing calls this directly
no test coverage detected