Documentation
¶
Overview ¶
Package tarx packs a directory to a tar.gz stream and safely unpacks one — archive/tar gives the container format but leaves the two loops everyone re-writes (walk-and-add, extract-without-zip-slip) to the caller, and the extraction loop is famously easy to get wrong.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PackDir ¶
PackDir writes dir as a tar.gz stream to w. Entries are relative to dir; regular files, directories and symlinks are kept (sockets/devices skipped — they're runtime state, not data). Entries for which skip returns true are omitted (nil = keep everything); a skipped directory prunes its subtree.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.