Documentation ¶
Index ¶
- Constants
- func GetLinesFromZip(zipPath string, paths ...string) (map[string]string, error)
- func GetTextFromZip(zipPath string, path string) (string, error)
- func GlobMatch(pattern, path string) bool
- func ReadFileContext(file *zip.File) string
- func SafeCopy(dst io.Writer, src io.Reader) error
- func TraverseFilesInZip(zipPath string, visitor func(*zip.File) error, targetPaths ...string) error
- type FileManifest
- type ZipReadCloser
Constants ¶
View Source
const ( KB = 1 << (10 * iota) MB GB )
Variables ¶
This section is empty.
Functions ¶
func GetLinesFromZip ¶
GetLinesFromZip extracts select paths for the given archive and returns a set of string contents for each path.
func GetTextFromZip ¶
GetTextFromZip get content by path from given archive file
func ReadFileContext ¶
Types ¶
type FileManifest ¶
FileManifest is a collection of paths and their file metadata.
func ResolveFileManifest ¶
func ResolveFileManifest(path string) (FileManifest, error)
ResolveFileManifest creates and returns a new ZipFileManifest populated with path and metadata from the given zip archive path.
func (FileManifest) GlobMatch ¶
func (f FileManifest) GlobMatch(patterns ...string) []string
Click to show internal directories.
Click to hide internal directories.