Documentation ¶
Index ¶
- Constants
- Variables
- func CompressTarGzip(ctx context.Context, srcPath string, destPath string) error
- func CompressZip(ctx context.Context, srcPath string, destPath string) error
- func DecompressTarGzip(ctx context.Context, srcPath string, destPath string) error
- func DecompressZip(ctx context.Context, srcPath string, destPath string) error
- type TarGzipWriter
- func (p *TarGzipWriter) AddDir(ctx context.Context, name string, dir string) error
- func (p *TarGzipWriter) AddFile(ctx context.Context, name string, file string) error
- func (p *TarGzipWriter) AddFileByReader(ctx context.Context, name string, fi os.FileInfo, reader io.Reader) error
- func (p *TarGzipWriter) Close()
- type ZipOption
- type ZipWriter
Constants ¶
View Source
const ( ZipStore = zip.Store ZipDeflate = zip.Deflate )
Variables ¶
View Source
var DefaultZipOption = ZipOption{ Method: ZipStore, }
Functions ¶
func CompressTarGzip ¶
func DecompressTarGzip ¶
Types ¶
type TarGzipWriter ¶
type TarGzipWriter struct {
// contains filtered or unexported fields
}
func NewTarGzipWriter ¶
func NewTarGzipWriter(path string) (*TarGzipWriter, error)
func (*TarGzipWriter) AddFileByReader ¶
func (*TarGzipWriter) Close ¶
func (p *TarGzipWriter) Close()
Click to show internal directories.
Click to hide internal directories.