Documentation ¶
Index ¶
- Variables
- func CleanFileName(fileName string) string
- func SimpleExtract(params *SimpleExtractParams) (*savior.ExtractorResult, error)
- type Contents
- type EntriesLister
- type Entry
- type ExtractParams
- type Info
- type LoadFunc
- type ProbeParams
- type SaveFunc
- type SimpleExtractParams
- type Strategy
- type ThrottledSaveFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnrecognizedArchiveType = errors.New("Unrecognized archive type")
)
Functions ¶
func CleanFileName ¶
func SimpleExtract ¶
func SimpleExtract(params *SimpleExtractParams) (*savior.ExtractorResult, error)
Types ¶
type EntriesLister ¶
type ExtractParams ¶
type Info ¶
type Info struct { Strategy Strategy Features savior.ExtractorFeatures Format string PostExtract []string }
func Probe ¶
func Probe(params ProbeParams) (*Info, error)
Probe attempts to determine the type of an archive Returns (nil, nil) if it is not a recognized archive type Returns (nil, non-nil) if it IS a recognized archive type, but something's wrong with it. Returns (non-nil, nil) if it is a recognized archive type and we are confident we can extract it correctly.
func (*Info) GetExtractor ¶
type ProbeParams ¶
type SimpleExtractParams ¶
type Strategy ¶
type Strategy int
const ( StrategyNone Strategy = 0 StrategyZip Strategy = 100 // linux binaries for example - they might be MojoSetup installers // (.zip files), or they might not be. StrategyZipUnsure Strategy = 101 StrategyTar Strategy = 200 StrategyTarGz Strategy = 201 StrategyTarBz2 Strategy = 202 StrategyTarXz Strategy = 203 StrategySevenZip Strategy = 300 // .exe files for example - might be self-extracting // archives 7-zip can handle, or they might not. StrategySevenZipUnsure Strategy = 301 // .dmg files can only be properly extracted on macOS. // 7-zip struggles with ISO9660 disk images for example, // and doesn't support APFS yet (as of 18.05) StrategyDmg Strategy = 400 // .rar files we do *not* want to open while probing StrategyRar Strategy = 500 )
type ThrottledSaveFunc ¶
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
Click to show internal directories.
Click to hide internal directories.