zipper

package module
v0.0.0-...-2ce12ac Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

Zipper

Golang Lib to create a Zip Archive of a file or folder. That will be compatible with Java's ZipInputStream

See: http://webmail.dev411.com/p/gg/golang-nuts/155g3s6g53/go-nuts-re-zip-files-created-with-archive-zip-arent-recognised-as-zip-files-by-java-util-zip

Usage

import (
       "log"

       "github.com/30x/zipper"
)

func main() {
  err := zipper.Archive("~/Source/dir/", "./output.zip")
  if err != nil {
     log.Fatal(err)
  }
}

Documentation

Index

Constants

View Source
const CentralDirectoryFileHeaderLen = 46
View Source
const EOCDLen = 22

Variables

This section is empty.

Functions

func Archive

func Archive(source, target string, options Options) error

Archive processes the file headers after zipping

func ArchiveUnprocessed

func ArchiveUnprocessed(source, target string, options Options) error

ArchiveUnprocessed does not process the file headers after zipping.

Types

type Options

type Options struct {
	ExcludeBaseDir bool
}

Jump to

Keyboard shortcuts

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