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
- Host: GitHub
- URL: https://github.com/efforg/tokio-dl-stream-to-disk
- Owner: EFForg
- License: mit
- Created: 2021-08-17T18:43:33.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T04:11:04.000Z (almost 2 years ago)
- Last Synced: 2025-04-19T11:09:20.097Z (about 1 year ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 7
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `tokio-dl-stream-to-disk`
[](https://crates.io/crates/tokio-dl-stream-to-disk)
[](https://docs.rs/tokio-dl-stream-to-disk)
[](./LICENSE)
[](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