An open API service indexing awesome lists of open source software.

https://github.com/efforg/tokio-dl-stream-to-disk

A micro-library for downloading from a URL and streaming it directly to the disk
https://github.com/efforg/tokio-dl-stream-to-disk

Last synced: about 1 year ago
JSON representation

A micro-library for downloading from a URL and streaming it directly to the disk

Awesome Lists containing this project

README

          

# `tokio-dl-stream-to-disk`

[![crates.io](https://img.shields.io/crates/v/tokio-dl-stream-to-disk.svg)](https://crates.io/crates/tokio-dl-stream-to-disk)
[![Documentation](https://docs.rs/tokio-dl-stream-to-disk/badge.svg)](https://docs.rs/tokio-dl-stream-to-disk)
[![MIT licensed](https://img.shields.io/crates/l/tokio-dl-stream-to-disk.svg)](./LICENSE)
[![CI](https://github.com/EFForg/tokio-dl-stream-to-disk/actions/workflows/ci.yml/badge.svg)](https://github.com/EFForg/tokio-dl-stream-to-disk/actions/workflows/ci.yml)

A micro-library for downloading from a URL and streaming it directly to the disk

## Getting Started

```rust
use std::path::Path;
use tokio_dl_stream_to_disk::AsyncDownload;

#[tokio::main]
async fn main() {
if AsyncDownload::new("https://bit.ly/3yWXSOW", &Path::new("/tmp"), "5mb_test.bin").download(&None).await.is_ok() {
println!("File downloaded successfully!");
}
}
```

License: MIT