Function tvix_castore::import::fs::dir_entry_to_ingestion_entry

source ·
pub async fn dir_entry_to_ingestion_entry<BS>(
    blob_service: BS,
    entry: &DirEntry,
    prefix: &Path
) -> Result<IngestionEntry, Error>
where BS: BlobService,
Expand description

Converts a walkdir::DirEntry into an IngestionEntry, uploading blobs to the provided BlobService.

The prefix path is stripped from the path of each entry. This is usually the parent path of the path being ingested so that the last element of the stream only has one component.