build: golang.org/x/build/tarutil Index | Files

package tarutil

import "golang.org/x/build/tarutil"

Package tarutil contains utilities for working with tar archives.

Index

Package Files

tarutil.go

type FileList Uses

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

FileList is a list of entries in a tar archive which acts as a template to make .tar.gz io.Readers as needed.

The zero value is a valid empty list.

All entries must be added before calling OpenTarGz.

func (*FileList) AddHeader Uses

func (fl *FileList) AddHeader(h *tar.Header)

AddHeader adds a non-regular file to the FileList.

func (*FileList) AddRegular Uses

func (fl *FileList) AddRegular(h *tar.Header, size int64, content io.ReaderAt)

AddRegular adds a regular file to the FileList.

func (*FileList) TarGz Uses

func (fl *FileList) TarGz() io.ReadCloser

TarGz returns an io.ReadCloser of a gzip-compressed tar file containing the contents of the FileList. All Add calls must happen before OpenTarGz is called. Callers must call Close on the returned ReadCloser to release resources.

Package tarutil imports 4 packages (graph) and is imported by 1 packages. Updated 2017-12-16. Refresh now. Tools for package owners.