zip

package
v0.0.0-...-46e600a Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package zip make a packing base on raw zip package. It let you easy to pack files and folds directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pack

func Pack(dst, src string) error

Pack src into dst

Types

type Writer

type Writer struct {
	zip.Writer
	Prefix string // Path prefix of writed files.
}

Writer implements a zip file writer.

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter returns a new Writer writing a zip file to w.

func (*Writer) WriteBytes

func (w *Writer) WriteBytes(path string, fileBytes []byte) error

WriteBytes write file bytes to zip.

func (*Writer) WriteFile

func (w *Writer) WriteFile(path string) error

WriteFile write a file to zip.

func (*Writer) WriteFiles

func (w *Writer) WriteFiles(path string) error

WriteFiles write all files in path to zip.

Jump to

Keyboard shortcuts

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