SiaSia Developer Portal

Download to a File

Stream decrypted bytes directly to disk instead of buffering in memory.

rust
use sia_storage::DownloadOptions; let mut file = tokio::fs::File::create("output.bin").await?; sdk.download(&mut file, &obj, DownloadOptions::default()).await?;