utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(files []*os.File, dest string) error

压缩 使用gzip压缩成tar.gz

func CompressFile

func CompressFile(Src string, Dst string) error

压缩文件Src到Dst

func DeCompress

func DeCompress(tarFile, dest string) error

解压 tar.gz

func FindFile

func FindFile(path, fileName string) (filePath string, err error)

func NewDeCompress

func NewDeCompress(path string) error

func TarGz

func TarGz(srcPath string, destFile string, flag int) error

TarGz tar for srcPath and create destFile flag = 0,not contains srcPath dir, flag = 1, contains srcPath

func UnTarGz

func UnTarGz(dst string, r io.Reader) error

UnTarGz takes a destination path and a reader; a tar reader loops over the tar.gz file creating the file structure at 'dst' along the way, and writing any files

func UrlDC

func UrlDC(url string) (destPath string, err error)

url解压

Types

This section is empty.

Jump to

Keyboard shortcuts

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