Documentation ¶
Index ¶
- func Bzip(src io.Reader, f, dst string, c *WriteCounter) error
- func Check(e error)
- func Extract(fileList []string, destDir string, numC int) (err error)
- func GetFileCType(out *os.File) (string, error)
- func GetFileName(f string) string
- func Gzip(src io.Reader, dst string, c *WriteCounter) error
- func Rar(src io.Reader, dst string, c *WriteCounter) error
- func Szip(src io.Reader, dst string) error
- func Tar(src io.Reader, dst string, c *WriteCounter) error
- func Zip(src, dst string, c *WriteCounter) error
- type WriteCounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileCType ¶
GetFileCType is a simplistic way of pulling out the MIMI type of a file. Does not always pull out the type, and will instead replace with application/octet-stream. Particularly when the filie is smaller than 512 bytes. As such, this should not necessarily be relied upon.
func GetFileName ¶
GetFileName will strip the the file name to extract to by removing the suffix. e.g. filename.tar becomes filename
func Zip ¶
func Zip(src, dst string, c *WriteCounter) error
Types ¶
type WriteCounter ¶ added in v1.3.0
type WriteCounter struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.