Documentation ¶
Overview ¶
Package archive handles collections of files that are either packaged together or compressed.
Index ¶
- Variables
- func Compress(files []string, buf io.Writer) (errs []error)
- func Delete(files []string) (errs []error)
- func Extractor(source, filename, extract, destination string) error
- func FileCopy(name, dest string) (written int64, err error)
- func FileMove(name, dest string) (written int64, err error)
- func FindNFO(name string, files ...string) string
- func Proof(archive, filename, uuid string) error
- func Read(uuid, filename string) (files []string, err error)
- func Readr(archive, filename string) (files []string, err error)
- func Restore(uuid, filename, destination string) (files []string, err error)
- func Store(files []string, buf io.Writer) (errs []error)
- func Unarchiver(source, filename, destination string) error
- type Demozoo
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoCustom no customization. ErrNoCustom = errors.New("does not support customization") // ErrNotArc not an archive. ErrNotArc = errors.New("format specified by source filename is not an archive format") // ErrSameArgs same same. ErrSameArgs = errors.New("name and dest cannot be the same") // ErrWalkrFmt cannot walk archive. ErrWalkrFmt = errors.New("format specified by archive filename is not a walker format") )
Functions ¶
func Extractor ¶ added in v1.1.31
Extractor extracts a file from the given archive file into the destination folder. The archive format is selected implicitly. Archiver relies on the filename extension to determine which decompression format to use, which must be supplied using filename.
func Proof ¶ added in v1.1.31
Proof decompresses and parses an archive. uuid is used to rename the extracted assets such as image previews.
func Read ¶
Read returns a list of files within an rar, tar, zip or 7z archive. uuid is the absolute path to the archive file named as a unique id. filename is the original archive filename and file extension.
func Readr ¶
Readr returns a list of files within an rar, tar or zip archive. It has offers compatibility with compression formats.
func Restore ¶
Restore unpacks or decompresses a given archive file to the destination. The archive format is selected implicitly. Restore relies on the filename extension to determine which decompression format to use, which must be supplied using filename. uuid is the absolute path to the archive file named as a unique id. filename is the original archive filename and file extension.
func Unarchiver ¶
Unarchiver unarchives the given archive file into the destination folder. The archive format is selected implicitly. Archiver relies on the filename extension to determine which decompression format to use, which must be supplied using filename.