Skip to main content

Module extract

Module extract 

Source
Expand description

Archive extraction with path-traversal protection.

Both tar_gz and [zip] iterate an archive in memory and write selected entries beneath dest. strip_prefix (e.g. Some("package/") for npm tarballs) is removed from each entry path before Select is applied.

Enums§

Select
Which archive entries to extract, and where each lands (relative to dest).

Functions§

tar_gz
Extract a gzipped tarball into dest. Returns the number of files written.
zip
Extract a zip archive into dest. Returns the number of files written.