zip

package
v0.0.0-...-57f3baa Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnTarGzip

func UnTarGzip(srcPath, destPath string,
	overwriteMode OverwriteMode) Err

Based on https://stackoverflow.com/a/24792688/3824328

func Unarchive

func Unarchive(srcPath, destPath string,
	overwriteMode OverwriteMode) Err

Based on https://stackoverflow.com/a/24792688/3824328

func Zip

func Zip(srcPath string, destPath string) Err

Zips "srcPath" into "destPath".

Returned errors:

ec.NoError // success
ec.NotFound // srcPath does not exist
ec.AlreadyExists // destPath already exists

May return other errors for other situations.

Types

type OverwriteMode

type OverwriteMode int

OverwriteMode:

NoOverwrite // Skip operation if destination exists.
Merge // Do not delete anything, only add files that are new.
SoftOverwrite // Do not delete destination directory, but overwrite individual files.
FullOverwrite // Delete destination and its contents, then copy new files.
const (
	// Skip operation if destination exists.
	NoOverwrite OverwriteMode = iota
	// Do not delete any files inside destination, only add files that are new to destination.
	Merge
	// Do not delete destination directory, but overwrite individual files.
	// Other files (if any) leave intact.
	SoftOverwrite
	// Delete destination and its contents, then copy new files.
	FullOverwrite
)

Jump to

Keyboard shortcuts

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