Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrLoop = errors.New("tarfs: loop detected while following symbolic links")
)
Functions ¶
func Archive ¶
Archive archives a file system into a tarball.
If the file system contains symbolic links, it must implement a ReadLink method with this signature to allow reading the value of the link targets:
type ReadLinkFS interface { ReadLink(name string) (string, error) }
See https://github.com/golang/go/issues/49580 for details about the expected behavior of the ReadLinkFS interface.
func Extract ¶
Extract extracts files from the tarbal to a directory at path on the file system.
Note: at this time, since fs.FS is a read-only API, we chose to only support extracting files to a local path. This could be revisited in the future if Go gets an API to interact with writable file systems, likely we would then add a ExtractFS function to maintain backward compatiblity.
Types ¶
This section is empty.