MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / extract_tar_reader_to_dir

Function extract_tar_reader_to_dir

crates/openshell-driver-vm/src/driver.rs:3818–3823  ·  view source on GitHub ↗
(reader: impl Read, dest: &Path)

Source from the content-addressed store, hash-verified

3816}
3817
3818fn extract_tar_reader_to_dir(reader: impl Read, dest: &Path) -> Result<(), String> {
3819 let mut archive = tar::Archive::new(reader);
3820 archive
3821 .unpack(dest)
3822 .map_err(|err| format!("extract layer into {}: {err}", dest.display()))
3823}
3824
3825// `media_type` is an OCI media type string (e.g. `application/vnd.oci.image.layer.v1.tar+gzip`),
3826// not a filesystem path, so case-sensitive comparison is correct.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected