Versions in this module Expand all Collapse all v1 v1.0.1 Nov 1, 2024 v1.0.0 Nov 1, 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") + type Archive struct + Path string + Type Type + func Open(archiveType Type, path string) (*Archive, error) + func OpenFS(filesystem Filesystem, archiveType Type, 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) 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