archiverKit

package
v3.0.910 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Identify 识别格式.
	/*
		https://github.com/mholt/archiver?tab=readme-ov-file#identifying-formats
	*/
	Identify func(filename string, stream io.Reader) (archiver.Format, io.Reader, error) = archiver.Identify
)

Functions

func ArchiveToTarGz deprecated

func ArchiveToTarGz(ctx context.Context, output io.Writer, mapper map[string]string, options *archiver.FromDiskOptions) error

ArchiveToTarGz 压缩为 .tar.gz格式 的压缩文件.

Deprecated: 目前(github.com/mholt/archiver/v4 v4.0.0-alpha.8)有点问题,目录内的文件中存在中文的情况,会有丢失. e.g.压缩"/Users/richelieu/Documents/ino/images"目录

func ArchiveToZip

func ArchiveToZip(ctx context.Context, output io.Writer, mapper map[string]string, options *archiver.FromDiskOptions) error

ArchiveToZip 压缩为 .zip格式 的压缩文件.

Types

This section is empty.

Jump to

Keyboard shortcuts

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