Documentation ¶
Index ¶
- func Copy(srcPath, destPath string) error
- func DupStderr(filename string, onResult func(err error))
- func GZipTar(filePath string, w io.Writer, removeSrcFile ...bool) (err error)
- func GZipTarToFile(filePath string, targetPath string, removeSrcFile ...bool) error
- func IsDirExists(dir string) bool
- func IsFileExists(path string) bool
- func MakeDir(dir string) error
- func Move(oldPath, newPath string) error
- func OpenFile(filename string, flags ...int) (*os.File, error)
- func UnGZipTarF(r io.Reader, f func(h *tar.Header, r io.Reader) error) error
- func UnGZipTarFileF(filePath string, f func(h *tar.Header, r io.Reader) error, ...) error
- func UnGZipTarFileToDir(filePath string, dir string, removeSrcFile ...bool) error
- func UnGZipTarToDir(r io.Reader, dir string) error
- func WriteFile(filename string, data []byte, perm os.FileMode) error
- func WriteFileF(filename string, perm os.FileMode, f func(f *os.File) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GZipTarToFile ¶
GZipTarToFile gzip 压缩打包到文件
filePath 打包的文件/文件夹 targetPath 打包后的文件路径 removeSrcFile 打包成功后删除打包的文件/文件夹 true.删除
func IsDirExists ¶
func IsFileExists ¶
func UnGZipTarFileF ¶
func UnGZipTarFileF(filePath string, f func(h *tar.Header, r io.Reader) error, removeSrcFile ...bool) error
UnGZipTarFileF gzip 解压文件流
filePath gzip压缩文件 f 回调解压后的文件流 如果是文件夹,r 为nil removeSrcFile 解压成功后删除压缩文件 true.删除
func UnGZipTarFileToDir ¶
UnGZipTarFileToDir gzip解压文件到目录
filePath gzip压缩文件 dir 解压到文件夹 removeSrcFile 解压成功后删除压缩文件 true.删除
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.