Documentation ¶
Index ¶
- func Create(inputPath string, zipPath string) error
- func CreateExcluding(inputPath string, zipPath string, exclusions []string) error
- func CreateFlat(inputPath string, zipPath string) error
- func Extract(archivePath string, extractPath string) error
- func IsValidZip(maybeZip string) (bool, error)
- func Walk(path string, walkFn WalkFunc) error
- type WalkFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create build a zip containing inputPath. If inputPath is a directory the zip will contain the directory
func CreateExcluding ¶ added in v0.4.0
Create build a zip containing inputPath but excluding files matching `exclusions` regex. If inputPath is a directory the zip will contain the directory
func CreateFlat ¶
CreateFlat build a zip containing inputPath. If inputPath is a directory the zip will contain the directory contents
func IsValidZip ¶
IsValidZip checks if the file is detected as zip: Java jar, war and ear files are zip
Types ¶
type WalkFunc ¶
WalkFunc is the type of the function called for each file or directory visited by Walk.
If there was a problem walking to the file or directory named by path, the incoming error will describe the problem and the function can decide how to handle that error (and Walk will not descend into that directory). If an error is returned, processing stops.
TODO: this signature requires client code import archive/zip