MCPcopy Create free account
hub / github.com/colmap/colmap / MaybeDownloadAndCacheFile

Function MaybeDownloadAndCacheFile

src/colmap/util/file.cc:523–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521#endif // COLMAP_DOWNLOAD_ENABLED
522
523std::filesystem::path MaybeDownloadAndCacheFile(const std::string& uri) {
524 if (!IsURI(uri)) {
525 return uri;
526 }
527#ifdef COLMAP_DOWNLOAD_ENABLED
528 return DownloadAndCacheFile(uri);
529#else
530 throw std::runtime_error("COLMAP was compiled without download support");
531#endif
532}
533
534} // namespace colmap

Callers 3

ReadMethod · 0.85
TESTFunction · 0.85
ONNXModelMethod · 0.85

Calls 2

IsURIFunction · 0.85
DownloadAndCacheFileFunction · 0.85

Tested by 1

TESTFunction · 0.68