Function iroh_blobs::export::export

source ·
pub async fn export<D: BaoStore>(
    db: &D,
    hash: Hash,
    outpath: PathBuf,
    format: ExportFormat,
    mode: ExportMode,
    progress: impl ProgressSender<Msg = ExportProgress> + IdGenerator
) -> Result<()>
Expand description

Export a hash to the local file system.

This exports a single hash, or a collection recursive is true, from the db store to the local filesystem. Depending on mode the data is either copied or reflinked (if possible).

Progress is reported as ExportProgress through a ProgressSender. Note that the ExportProgress::AllDone event is not emitted from here, but left to an upper layer to send, if desired.