targzip

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TarGzip

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

TarGzip is a combined writer for .tar.gz-alike files

func NewTempFile

func NewTempFile(dir string) (*TarGzip, error)

NewTempFile create a new targzip writer tempfile

func (*TarGzip) AddDirectory

func (t *TarGzip) AddDirectory(dirpath string) error

AddDirectory adds a directory entry

func (*TarGzip) AddFile

func (t *TarGzip) AddFile(filename string, dest ...string) error

AddFile write a file from filename into dest

func (*TarGzip) AddFileFromBuffer

func (t *TarGzip) AddFileFromBuffer(filename string, b []byte) error

AddFileFromBuffer adds a file from a buffer

func (*TarGzip) Close

func (t *TarGzip) Close() error

Close closes the targzip writer

func (*TarGzip) Name

func (t *TarGzip) Name() string

Name returns the name of the file as presented to Open.

func (*TarGzip) Remove

func (t *TarGzip) Remove() error

Remove removes the tempfile

func (*TarGzip) Size

func (t *TarGzip) Size() int64

Size returns the length in bytes for the closed file

func (*TarGzip) Write

func (t *TarGzip) Write(p []byte) (n int, err error)

Write writes raw tar data

func (*TarGzip) Written

func (t *TarGzip) Written() uint64

Written returns the amount of bytes written in uncompressed form

Jump to

Keyboard shortcuts

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