Function tvix_castore::import::fs::dir_entry_to_ingestion_entry

source ยท
pub async fn dir_entry_to_ingestion_entry<BS, P>(
    blob_service: BS,
    entry: &DirEntry,
    prefix: &Path,
    reference_scanner: Option<&ReferenceScanner<P>>,
) -> Result<IngestionEntry, Error>
where BS: BlobService, P: AsRef<[u8]>,
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.