archive

package
v10.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2018 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnrecognizedArchiveType = errors.New("Unrecognized archive type")
)

Functions

func CleanFileName

func CleanFileName(fileName string) string

Types

type ArchiveInfo

type ArchiveInfo struct {
	Strategy ArchiveStrategy
	Features savior.ExtractorFeatures
}

func Probe

func Probe(params *TryOpenParams) (*ArchiveInfo, error)

func (*ArchiveInfo) GetExtractor

func (ai *ArchiveInfo) GetExtractor(file eos.File, consumer *state.Consumer) (savior.Extractor, error)

type ArchiveStrategy

type ArchiveStrategy int
const (
	ArchiveStrategyNone ArchiveStrategy = 0

	ArchiveStrategyZip ArchiveStrategy = 100

	ArchiveStrategyTar    ArchiveStrategy = 200
	ArchiveStrategyTarGz  ArchiveStrategy = 201
	ArchiveStrategyTarBz2 ArchiveStrategy = 202

	ArchiveStrategySevenZip ArchiveStrategy = 300
)

type Contents

type Contents struct {
	Entries []*Entry
}

type Entry

type Entry struct {
	Name             string
	UncompressedSize int64
}

Entry refers to a file entry in an archive

type ExtractParams

type ExtractParams struct {
	File       eos.File
	StagePath  string
	OutputPath string

	Consumer *state.Consumer

	Load LoadFunc
	Save SaveFunc
}

type LoadFunc

type LoadFunc func(state interface{}) error

type SaveFunc

type SaveFunc func(state interface{}) error

type ThrottledSaveFunc

type ThrottledSaveFunc func(state interface{}, force bool) bool

Saves the state if force is true or the interval has passed Returns true if the state was actually saved, false if not

func ThrottledSave

func ThrottledSave(params *ExtractParams) ThrottledSaveFunc

type TryOpenParams

type TryOpenParams struct {
	File     eos.File
	Consumer *state.Consumer
}

Directories

Path Synopsis
formulas
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.

Jump to

Keyboard shortcuts

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