Versions in this module Expand all Collapse all v0 v0.0.3 Feb 15, 2024 Changes in this version + const DefaultBufferSize + const DefaultDirMode + const DefaultFileMode + const DefaultSuffix + var ErrInvalidHead = fmt.Errorf("archived file contains invalid header file") + var ErrInvalidPath = fmt.Errorf("archived file contains invalid path") + var ErrNoCompressedFiles = fmt.Errorf("no compressed files found") + var ErrNoConfig = fmt.Errorf("call NewQueue() to initialize a queue") + var ErrNoLogger = fmt.Errorf("xtractr.Config.Logger must be non-nil") + var ErrQueueRunning = fmt.Errorf("extractor queue running, cannot start") + var ErrQueueStopped = fmt.Errorf("extractor queue stopped, cannot extract") + var ErrUnknownArchiveType = fmt.Errorf("unknown archive file type") + func Difference(slice1 []string, slice2 []string) []string + func Extract7z(xFile *XFile) (int64, []string, []string, error) + func ExtractBzip(xFile *XFile) (int64, []string, error) + func ExtractFile(xFile *XFile) (int64, []string, []string, error) + func ExtractGzip(xFile *XFile) (int64, []string, error) + func ExtractISO(xFile *XFile) (int64, []string, error) + func ExtractRAR(xFile *XFile) (int64, []string, []string, error) + func ExtractTar(xFile *XFile) (int64, []string, error) + func ExtractTarBzip(xFile *XFile) (int64, []string, error) + func ExtractTarGzip(xFile *XFile) (int64, []string, error) + func ExtractZIP(xFile *XFile) (int64, []string, error) + func ExtractZIPNew(xFile *XFile) (int64, []string, error) + func FindCompressedFiles(filter Filter) map[string][]string + type Config struct + BuffSize int + DirMode os.FileMode + FileMode os.FileMode + Parallel int + Suffix string + type Exclude []string + func (e Exclude) Has(test string) bool + type Filter struct + ExcludeSuffix Exclude + Path string + type Logger interface + Debugf func(string, ...interface{}) + Printf func(string, ...interface{}) + type Response struct + Archives map[string][]string + Done bool + Elapsed time.Duration + Error error + Extras map[string][]string + NewFiles []string + Output string + Queued int + Size int64 + Started time.Time + X *Xtract + type XFile struct + DirMode os.FileMode + FileMode os.FileMode + FilePath string + OutputDir string + Password string + Passwords []string + func (x *XFile) Extract() (int64, []string, []string, error) + type Xtract struct + CBChannel chan *Response + CBFunction func(*Response) + DeleteOrig bool + ExtractTo string + LogFile bool + Name string + Password string + Passwords []string + RecurseISO bool + TempFolder bool + type Xtractr struct + func NewQueue(config *Config) *Xtractr + func (x *Xtractr) DeleteFiles(files ...string) + func (x *Xtractr) Extract(extract *Xtract) (int, error) + func (x *Xtractr) GetFileList(path string) ([]string, error) + func (x *Xtractr) MoveFiles(fromPath string, toPath string, overwrite bool) ([]string, error) + func (x *Xtractr) Rename(oldpath, newpath string) error + func (x *Xtractr) Start() error + func (x *Xtractr) Stop()