Expand description
Shared download logic between HttpRegistry and GitRegistry.
Re-exportsยง
use crate::util::interning::InternedString;๐use anyhow::Context as _;๐use cargo_credential::Operation;๐use cargo_util::Sha256;๐use cargo_util::registry::crate_url;๐use crate::sources::registry::MaybeLock;๐use crate::sources::registry::RegistryConfig;๐use crate::util::auth;๐use crate::util::cache_lock::CacheLockMode;๐use crate::util::errors::CargoResult;๐use crate::util::Filesystem;๐use crate::util::GlobalContext;๐use crate::workspace::PackageId;๐use crate::workspace::global_cache_tracker;๐use std::fs;๐use std::fs::File;๐use std::fs::OpenOptions;๐use std::io::SeekFrom;๐use std::str;๐use std::io::prelude::*;๐
Functionsยง
- download ๐
- Checks if
pkgis downloaded and ready under the directory atcache_path. If not, returns a URL to download it from. - finish_
download ๐ - Verifies the integrity of
datawithchecksumand persists it under the directory atcache_path. - is_
crate_ ๐downloaded - Checks if a tarball of
pkghas been already downloaded under the directory atcache_path.