extract

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotArchive

func IsNotArchive(err error) bool

IsNotArchive returns true if the error is of ErrNotArchive type

func NewRarArchive

func NewRarArchive(path string) (types.MediaArchive, error)

NewRarArchive creates a new rar archive object to extract media from

func NewZipArchive

func NewZipArchive(path string) (types.MediaArchive, error)

NewZipArchive creates a new zip archive object to extract media from

func OpenMediaArchive

func OpenMediaArchive(path string) (types.MediaArchive, error)

OpenMediaArchive opens the file as an archive and exposes the media files within. If the file is not recognized as any of the known archive formats, an error is returned

Types

type ErrNotArchive

type ErrNotArchive struct {
	// contains filtered or unexported fields
}

ErrNotArchive is an error which indicates the file was not an archive

type MediaFromArchive

type MediaFromArchive struct {
	os.FileInfo
	types.Media
	io.ReadCloser
}

MediaFromArchive representa a media item which is located inside a compressed archive

type RarArchive

type RarArchive struct {
	*rardecode.ReadCloser
}

RarArchive is an struct used to extract media files from rar archives

func (*RarArchive) Next

func (r *RarArchive) Next() (types.MediaReadCloser, error)

Next returns the next media item in the rar archive. If there are not more media files io.EOF is returned

type ZipArchive

type ZipArchive struct {
	*zip.ReadCloser
	// contains filtered or unexported fields
}

ZipArchive is an struct used to extract media files from zip archives

func (*ZipArchive) Next

func (z *ZipArchive) Next() (types.MediaReadCloser, error)

Next returns the next media item in the zip archive. If there are not more media files io.EOF is returned

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL