Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsZipFile ¶
IsZipFile reports file whether is a zip file. About the zip file format can refer to https://docs.fileformat.com/compression/zip/.
func Unzip ¶
Unzip decompresses a zip file to specified directory. Note that the destination directory don't need to specify the trailing path separator. If the destination directory doesn't exist, it will be created automatically.
func Zip ¶
Zip compresses the specified files or dirs to zip archive. If a path is a dir don't need to specify the trailing path separator. For example calling Zip("archive.zip", "dir", "csv/baz.csv") will get archive.zip and the content of which is baz.csv dir ├── bar.txt └── foo.txt Note that if a file is a symbolic link on Linux it will be skipped. If you want to follow a symbolic link please use the function ZipFollowSymlink.
func ZipFollowSymlink ¶
ZipFollowSymlink compresses the specified files or dirs to zip archive. If the specified files or dirs is a symbolic link ZipFollowSymlink will follow it. Note that the symbolic link need to avoid loops.
Types ¶
This section is empty.