tar

package
v0.0.0-...-9b4d37b Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTarSize

func GetTarSize(dat []byte) (int, error)

GetTarSize will return the actual size of the tar file for a byte array containing padded tar data.

func GetTargetFileNames

func GetTargetFileNames(dst string, archive io.Reader) ([]string, error)

GetTargetFileNames will return all file names in the archive provided.

func GetTargetFolderNames

func GetTargetFolderNames(dst string, archive io.Reader) ([]string, error)

GetTargetFolderNames will return all affected folders in the archive provided.

func IsSingleFileArchive

func IsSingleFileArchive(archive []byte) bool

IsSingleFileArchive will return true if there is only 1 file stored in the given archive.

func PackFolder

func PackFolder(src string, buf io.Writer) error

PackFolder will write the given folder as a tar to the given Writer.

func UnpackFile

func UnpackFile(dst, fname string, archive io.Reader, dest io.Writer) error

UnpackFile will extract the given file from the given archive to the given dest writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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