Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create creates a gzip compressed tar file containing the contents of the specified directory.
If the directory to archive is specified by a path such as "/tmp/myfiles/backups/weekly", then only the "weekly" directory, and none of its parent path, is added to the tar archive. When extracted, a "weekly" directory is created with all of its archived contents.
func CreateWriter ¶ added in v0.0.3
Create writes a gzip compressed tar file to an io.Writer. The tar file contains the contents of the specified directory.
Types ¶
type Option ¶
type Option func(*config)
Option is a function that sets a value in a config.
func WithIgnore ¶
WithIgnore specifies file names to ignore when creating an archive. Multiple names to ignore can be specified in a single call and in multiple calls to WithIgnore.