tarball

package
v0.0.0-...-08bd690 Latest Latest
Warning

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

Go to latest
Published: May 29, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tarball provides functions to manipulate tar files.

Note: this package is an implementation detail and shouldn't be used outside of docker2aci.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(tarReader tar.Reader, walkFunc func(t *TarFile) error) error

Walk walks through the files in the tarball represented by tarstream and passes each of them to the WalkFunc provided as an argument

Types

type TarFile

type TarFile struct {
	Header    *tar.Header
	TarStream io.Reader
}

TarFile is a representation of a file in a tarball. It consists of two parts, the Header and the Stream. The Header is a regular tar header, the Stream is a byte stream that can be used to read the file's contents.

func (*TarFile) Linkname

func (t *TarFile) Linkname() string

Linkname returns the Linkname of the file as reported by the header.

func (*TarFile) Name

func (t *TarFile) Name() string

Name returns the name of the file as reported by the header.

type WalkFunc

type WalkFunc func(t *TarFile) error

WalkFunc is a func for handling each file (header and byte stream) in a tarball

Jump to

Keyboard shortcuts

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