zip

package
v0.0.0-...-55e1de5 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: BSD-3-Clause Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	zip.Reader
	// contains filtered or unexported fields
}

Reader provides sequential access to the contents of a zip archive.

func NewReader

func NewReader(r io.ReaderAt, size int64) (*Reader, error)

NewReader returns a new Reader reading from r, which is assumed to have the given size in bytes.

func (*Reader) Files

func (r *Reader) Files() []*zip.File

Files returns the full list of files in the zip archive.

func (*Reader) NextFile

func (r *Reader) NextFile() (name string, err error)

NextFile advances to the next file in the zip archive.

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type Writer

type Writer struct {
	zip.Writer
	// contains filtered or unexported fields
}

Writer provides sequential writing of a zip archive.1 format.

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter returns a new Writer writing to w.

func (*Writer) NextFile

func (w *Writer) NextFile(name string, fi os.FileInfo) error

NextFile computes and writes a header and prepares to accept the file's contents.

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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