Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TarBuilder ¶
type TarBuilder struct {
// contains filtered or unexported fields
}
TarBuilder is a struct for building tar archives
func New ¶
func New(baseDir, tarName string) (*TarBuilder, error)
New creates a new TarBuilder and initializes the tar file
func (*TarBuilder) Add ¶
func (tb *TarBuilder) Add(paths []string) error
Add adds multiple files and/or directories to the tar archive
func (*TarBuilder) AddDirectory ¶
func (tb *TarBuilder) AddDirectory(path string) error
AddDirectory adds a directory to the tar archive
func (*TarBuilder) AddFile ¶
func (tb *TarBuilder) AddFile(path string) error
AddFile adds a single file to the tar archive
func (*TarBuilder) Write ¶
func (tb *TarBuilder) Write() error
Write finalizes the tar archive and closes the file
Click to show internal directories.
Click to hide internal directories.