dload

Crates.iodload
lib.rsdload
version0.1.3
sourcesrc
created_at2024-04-28 09:51:00.406699
updated_at2024-06-04 09:07:40.976964
descriptionA simple crate to help you download files from URLs easily.
homepage
repository
max_upload_size
id1223144
size47,341
dcodes (dcodesdev)

documentation

README

dload

dload is a simple crate to help downloading files from the internet easily. It is a simple wrapper around the reqwest crate.

Usage

Add it to your package:

cargo add dload

Then you can use it like this:

use dload::Downloader;

#[tokio::main]
async fn main() {
  let url = "https://www.rust-lang.org/logos/rust-logo-512x512.png";

  Downloader::new()
    .set_output_dir(dir)
    .file_name("rust-logo.png")
    .download(url)
    .await
    .unwrap();
}

This will download the file from the given URL and save it to the given directory with the given file name.

Commit count: 0

cargo fmt