tario

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompressionLevel = pgzip.DefaultCompression

CompressionLevel is the compression level of image layers. Default is pgzip.DefaultCompression.

Functions

func ApplyHeader

func ApplyHeader(path string, header *tar.Header) error

ApplyHeader updates file owner, mtime, and permission bits according to header. It doesn't change size or type (i.e file to dir).

func IsSimilarHeader

func IsSimilarHeader(h *tar.Header, nh *tar.Header, ignoreTime bool) (bool, error)

IsSimilarHeader returns if the given headers are describing similar entries.

func NewGzipReader

func NewGzipReader(r io.Reader) (io.ReadCloser, error)

NewGzipReader returns a new gzip reader.

func NewGzipWriter

func NewGzipWriter(w io.Writer) (io.WriteCloser, error)

NewGzipWriter returns a new gzip writer with compression level.

func SetCompressionLevel

func SetCompressionLevel(compressionLevelStr string) error

SetCompressionLevel sets global var CompressionLevel.

func Untar added in v0.1.14

func Untar(r io.Reader, dir string) error

Untar reads the tar file from r and writes it into dir.

func WriteEntry

func WriteEntry(w *tar.Writer, src string, h *tar.Header) error

WriteEntry write the file from the local filesystem into the tar writer. This function doesn't handle parent directories.

func WriteHeader

func WriteHeader(w *tar.Writer, h *tar.Header) error

WriteHeader writes the header given to the tar writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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