tarbuilder

package
v0.0.0-...-dc1b6dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL