package
module
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Sep 1, 2019
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Unzip

Golang *.zip decompress.
Fork from https://github.com/artdarek/go-unzip and remove print, add support for Symlink.
Thank artdarek.
Usage
import "github.com/yi-ge/unzip"
u := unzip.New(filePath, outDir)
err := u.Extract()
Notice
由于 Golang1.12 不再支持 Windows XP,因此使用 Golang 自带的 zip 库将在 XP 系统下发生报错,此库对老版本的支持则是自动下载远程unzip.exe
并自动调用http://infozip.sourceforge.net/UnZip.html实现。
Documentation
¶
FileIsExist -判断文件是否存在 存在返回 true 不存在返回false
ReadRemote - Do GET reuqest. Returns a slice of byte. If the hostHeader string for a module is "" then we use no hostHeader for it.
Unzip - struct
New - Create a new Unzip.
Extract - Extract zip file.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.