Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveReader ¶
type ArchiveReader struct {
// contains filtered or unexported fields
}
ArchiveReader provides a way to only read some selected files from either a .zip or .tar.gz archive
func New ¶
func New(archive string) (*ArchiveReader, error)
create a new archiveReader from the given archive (either a .zip or .tar.gz file)
func (*ArchiveReader) Close ¶
func (ar *ArchiveReader) Close() error
close the archiveReader and all it's resources
func (*ArchiveReader) GetElementFunc ¶
func (ar *ArchiveReader) GetElementFunc(fn func(string) bool) (io.ReadCloser, bool, uint64, error)
returns a file-like reader, wether the file is a directory the size of that file for the first path that satisfies fn
func (*ArchiveReader) IterateElementsFunc ¶
allows iteration over all elements in the archive fn is called on each element and should and error occur that error is returned
Click to show internal directories.
Click to hide internal directories.