zip

package
v0.0.0-...-69eaee5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFile

func ExtractFile(zipname string, filename string) ([]byte, error)

ExtractFile takes a zip and returns the bytes of target file inside it.

func ExtractFiles

func ExtractFiles(zipname string, filenames []string) (map[string][]byte, error)

ExtractFiles takes a zip and returns a map to the bytes of target files inside it.

func GetFileMimeType

func GetFileMimeType(f *os.File) (string, error)

GetFileMimeType guesses the mimetype of a file from reading its first 512 bytes

func OpenFile

func OpenFile(r *os.File, src string) (io.ReadCloser, error)

OpenFile finds a file `src` from the provided reader `w` for a zip file and returns a reader to it

Types

This section is empty.

Jump to

Keyboard shortcuts

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