archive

package
v0.0.0-...-4560a53 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Zlib Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTarGz

func ExtractTarGz(r io.Reader, outputDirPath string) error

ExtractTarGz reads a .tar.gz archive from the reader and extracts it into outputDirPath directory

func NewTarFileInBuffer

func NewTarFileInBuffer() *tarFileInBuffer

func TarFileInBuffer

func TarFileInBuffer(fileContent []byte, fileName string, mode int64) ([]byte, error)

TarFileInBuffer will create a tar archive containing a single file named via fileName and using the content specified in fileContent. Returns the archive as a byte array.

func TarGzDir

func TarGzDir(absolutePath string) (string, error)

TarGzDir creates a tar.gz archive and returns it's path. abosolutePath should be an absolute path to a directory. Archive name will be <directoryName>.tar.gz and will be placed next to the directory.

func UnzipArchive

func UnzipArchive(archiveData []byte, dest string) error

UnzipArchive will unzip an archive from bytes into the dest destination folder on disk

func UnzipFile

func UnzipFile(src string, dest string) error

UnzipFile will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).

Types

This section is empty.

Jump to

Keyboard shortcuts

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