15 #include <string_view>
21 bool IsURI(
const std::string& uri);
23 #ifdef COLMAP_DOWNLOAD_ENABLED
29 using DownloadProgressCallback =
30 std::function<void(int64_t downloaded, int64_t total)>;
38 std::optional<std::string> DownloadFile(
39 const std::string& url,
40 DownloadProgressCallback progress_callback =
nullptr);
43 std::string ComputeSHA256(
const std::string_view& str);
51 std::string DownloadAndCacheFile(
52 const std::string& uri,
53 DownloadProgressCallback progress_callback =
nullptr);
static const std::string path
bool IsURI(const std::string &uri)
std::filesystem::path GetCachedFilePath(const std::string &uri)
std::filesystem::path MaybeDownloadAndCacheFile(const std::string &uri)