Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZipElement ¶
type ZipElement struct {
// contains filtered or unexported fields
}
ZipElement is the in memory representation of a file inside a zip file.
func (ZipElement) BytesContent ¶
func (element ZipElement) BytesContent() ([]byte, error)
BytesContent gets the contant as a slice of bytes
func (ZipElement) IsValid ¶
func (element ZipElement) IsValid() bool
IsValid checks if a ZipElement has been loaded corectly in memory, and therefore if we can read its content.
func (ZipElement) Name ¶
func (element ZipElement) Name() string
Name gets the name (zip relative path) of this element.
func (ZipElement) StringContent ¶
func (element ZipElement) StringContent() (string, error)
StringContent gets the contant as a string
type ZipFile ¶
type ZipFile struct { Files []ZipElement Err error }
ZipFile is the in memory representation of an existing zip file.
func (ZipFile) FilesStartingWith ¶
func (zip ZipFile) FilesStartingWith(prefix string) []ZipElement
FilesStartingWith returns a slice of zip element with their names starting with a given prefix.
func (ZipFile) GetFile ¶
func (zip ZipFile) GetFile(name string) *ZipElement
GetFile returns a zip element matching a given name, or nil if NOT found.
Click to show internal directories.
Click to hide internal directories.