tenz

package module
v0.0.0-...-40ab738 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

tenz

Supports different types of file compression and decompression,such as: zip, gzip, tar, lzma ...

Documentation

Index

Constants

View Source
const (
	FILE_TYPE_ZIP    = ".zip"
	FILE_TYPE_TAR    = ".tar"
	FILE_TYPE_TAR_GZ = ".tar.gz"
	FILE_TYPE_TGZ    = ".tgz"
	FILE_TYPE_GZ     = ".gz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ITenZ

type ITenZ interface {
	// 解压缩
	DeCompress(scrFile string, dirName string) error
	// 压缩
	Compress() error
}

func NewTenZ

func NewTenZ() ITenZ

type TenZ

type TenZ struct {
}

func (*TenZ) Compress

func (s *TenZ) Compress() (err error)

func (*TenZ) DeCompress

func (s *TenZ) DeCompress(srcFile, dirname string) (err error)

@srcFile string 原文件 @dirname string 目标地址 @fileType string 文件类型

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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