Function download

Source
pub async fn download(
    path: impl AsRef<Path>,
    project: &str,
    version: Option<&str>,
    build: Option<u16>,
    checksum: bool,
) -> Result<()>
Expand description

Download the file.

download("/tmp/target.jar", "paper", Some("1.16.5"), None, true).await?; this will download papermc, version 1.16.5, with latest build (None means latest), and check download file’s hash.