es_zip

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorConflict = errors.New("conflict")
)
View Source
var (
	ErrorUnsupportedOperation = errors.New("unsupported operation")
)

Functions

func Extract

func Extract(log esl.Logger, archivePath, destPath string) error

Extract the archive file to dest path.

Types

type ZipWriter

type ZipWriter interface {
	// Create an archive file. dstPath must include file name.
	Open(dstPath string) error

	// Add a file into the archive.
	AddFile(srcFilePath string, relPath string) error

	// Add a folder into the archive.
	AddFolder(srcFolderPath string, relPath string) error

	// Flush and close the archive file
	Close() error
}

func NewWriter

func NewWriter(logger esl.Logger) ZipWriter

Jump to

Keyboard shortcuts

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