| 2138 | auto bundle = runtimeWrapper->getRuntime().getResourceManager().getBundle(moduleNameCpp); |
| 2139 | auto entry = bundle->getEntry(pathCpp); |
| 2140 | if (!entry) { |
| 2141 | return nullptr; |
| 2142 | } |
| 2143 | |
| 2144 | if (saveToDisk != 0) { |
| 2145 | Valdi::Path path(".valdi_extracted_module"); |
| 2146 | path.append(moduleNameCpp.toStringView()).append(pathCpp.toStringView()); |
| 2147 | const auto& diskCache = runtimeWrapper->getRuntime().getDiskCache(); |
| 2148 | auto result = diskCache->store(path, entry.value()); |
| 2149 | if (!result) { |
| 2150 | ValdiAndroid::throwJavaValdiException(fbjni::Environment::current(), result.error()); |
| 2151 | return nullptr; |
| 2152 | } |
| 2153 | |
| 2154 | auto filePath = diskCache->getAbsoluteURL(path).substring(std::string_view("file://").length()); |
nothing calls this directly
no test coverage detected