zipper

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Copyright 2022 Hal Canary Use of this program is governed by the file LICENSE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Zipper

type Zipper struct {
	ZipWriter *zip.Writer
	Error     error
}

Wrapper for archive/zip.Writer. Keeps track of its error state.

func Make

func Make(dst io.Writer) Zipper

Wraps `dst` with a `zip.Writer`. `Deflate` always uses `BestCompression`.

func (*Zipper) Close

func (zw *Zipper) Close()

Close the underlying `ZipWriter`

func (*Zipper) CreateDeflate

func (zw *Zipper) CreateDeflate(name string, mod time.Time) io.Writer

Add a new file to the zip archive (with deflate). Returns nil on error.

func (*Zipper) CreateStore

func (zw *Zipper) CreateStore(name string, mod time.Time) io.Writer

Add a new file to the zip archive (with store). Returns nil on error.

Jump to

Keyboard shortcuts

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