Versions in this module Expand all Collapse all v0 v0.1.3 Dec 9, 2024 Changes in this version + const Tar + const TarBzip + const TarGzip + const TarXz + const Zip + var ErrArchiveFileNotFound = errors.New("archive file not found") + var ErrArchiveTypeNotSupported = errors.New("archive type not supported") + func Extract(path string, options ExtractOptions) error + func ExtractFile(path string, file string, options ExtractFileOptions) error + type Archive struct + Path string + Type Type + func Open(path string) (*Archive, error) + func OpenFS(filesystem Filesystem, path string) (*Archive, error) + func (a *Archive) Close() error + func (a *Archive) Extract(opts ExtractOptions) error + func (a *Archive) ExtractBillyFS(filesystem billy.Filesystem, opts ExtractOptions) error + func (a *Archive) ExtractFile(path string, opts ExtractFileOptions) error + func (a *Archive) FileCount() int + func (a *Archive) GetFile(path string) (*File, error) + type ExtractFileOptions struct + Folder string + NotPreserveFileStructure bool + Overwrite bool + Perms os.FileMode + type ExtractOptions struct + Filter *regexp.Regexp + Folder string + NotPreserveFileStructure bool + Overwrite bool + type File struct + FileName string + Path string + func (f *File) Extract(opts ExtractFileOptions) error + func (f *File) ExtractBillyFS(filesystem billy.Filesystem, opts ExtractFileOptions) error + func (f *File) Read() ([]byte, error) + type Filesystem struct + func WrapBillyFS(filesystem billy.Filesystem) Filesystem + func WrapFS(filesystem fs.FS) Filesystem + func WrapPath(path string) Filesystem + type Type string