tar

package
v0.0.0-...-aea7a5c Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnableToUntar is returned when the tar file is unable to be untarred
	ErrUnableToUntar = fmt.Errorf("unable to untar")
	// ErrExtractingFileFromTar is returned when the file is unable to be extracted from the tar file
	ErrExtractingFileFromTar = fmt.Errorf("unable to extract file from tar")
	// ErrTarReading is returned when the tar file is unable to be read
	ErrTarReading = fmt.Errorf("unable to read tar file")
	// ErrCopyingContentFromTar is returned when the content is unable to be copied from the tar file
	ErrCopyingContentFromTar = fmt.Errorf("unable to copy content from tar")
	// ErrCreatingFileFromTar is returned when the file is unable to be created from the tar file
	ErrCreatingFileFromTar = fmt.Errorf("unable to create file from tar")
	// ErrReaderNotProvided is returned when the reader is not provided
	ErrReaderNotProvided = fmt.Errorf("reader not provided")
	// ErrDestinationNotProvided is returned when the destination is not provided
	ErrDestinationNotProvided = fmt.Errorf("destination not provided")
	// ErrFilesystemNotProvided is returned when the filesystem is not provided
	ErrFilesystemNotProvided = fmt.Errorf("filesystem not provided")
	// ErrTarFileHeaderNotProvided is returned when the tar file header is not provided
	ErrTarFileHeaderNotProvided = fmt.Errorf("tar file header not provided")
)

Functions

This section is empty.

Types

type Tar

type Tar struct {
	// contains filtered or unexported fields
}

Tar is a struct that implements the Tar operations

func NewTar

func NewTar(fs afero.Fs, logger repository.Logger) *Tar

NewTar creates a new Tar struct

func (*Tar) Extract

func (t *Tar) Extract(r io.Reader, destination string) error

Extract untar the io.Reader into the destination

Jump to

Keyboard shortcuts

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