Documentation
¶
Overview ¶
Package tarfs extracts tar streams into a directory safely, with optional OCI image-layer (whiteout) semantics.
All extraction rejects entries that would escape the destination directory via ".." traversal or symlinked parents (Zip Slip). Unpack extracts a plain (optionally gzipped) tar; UnpackLayer additionally applies OCI whiteouts so a sequence of UnpackLayer calls into the same directory reconstructs an image rootfs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unpack ¶
Unpack extracts the tar stream in r into dest. If the stream is gzipped it is decompressed first. Entries that would escape dest are rejected.
func UnpackLayer ¶
UnpackLayer is like Unpack but applies OCI whiteouts: an entry named ".wh.<name>" deletes the sibling <name> already present in dest, and an entry named ".wh..wh..opq" clears the existing contents of its directory. Applying image layers in order with UnpackLayer reconstructs the merged rootfs.
Types ¶
This section is empty.