Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotArchive ¶
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 ¶
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