extract

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZIP   = ".zip"
	TAR   = ".tar"
	TARGZ = ".tar.gz"
)
View Source
const DEFAULT_DIR_MODE = 0740

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ctx     context.Context
	Name    string
	Include TestFunc
	Exclude TestFunc
	Outdir  string
	IsFlat  bool
	Type    string
}

Config is an internal form of unarchive data source model

type ExtractInfo

type ExtractInfo struct {
	FileNames []string
	Msg       string
	Err       error
}

ExtractInfo is the result of the extraction

func Extract

func Extract(conf *Config) ExtractInfo

Extract is the main function to extract files from an archive file

type TestFunc

type TestFunc func(string) bool

TestFunc is a function with a string parameter to check includes and excludes

Jump to

Keyboard shortcuts

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