Documentation
¶
Index ¶
- Variables
- type Archive
- func (a *Archive) Close()
- func (a *Archive) Extract(i *Item, out *OutStream) error
- func (a *Archive) ExtractSeveral(indices []int64, ec *ExtractCallback) error
- func (a *Archive) Free()
- func (a *Archive) GetArchiveFormat() string
- func (a *Archive) GetItem(index int64) *Item
- func (a *Archive) GetItemCount() (int64, error)
- type ErrorCode
- type ExtractCallback
- type ExtractCallbackFuncs
- type InStream
- type Item
- type Lib
- type OutStream
- type PropertyIndex
- type ReadOp
- type ReadStats
- type ReaderAtCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCodeNoError ErrorCode = C.LIB7ZIP_NO_ERROR ErrCodeUnknownError ErrorCode = C.LIB7ZIP_UNKNOWN_ERROR ErrUnknownError = errors.New("Unknown 7-zip error") ErrCodeNotInitialize ErrorCode = C.LIB7ZIP_NOT_INITIALIZE ErrNotInitialize = errors.New("7-zip not initialized") ErrCodeNeedPassword ErrorCode = C.LIB7ZIP_NEED_PASSWORD ErrNeedPassword = errors.New("Password required to extract archive with 7-zip") ErrCodeNotSupportedArchive ErrorCode = C.LIB7ZIP_NOT_SUPPORTED_ARCHIVE ErrNotSupportedArchive = errors.New("Archive type not supported by 7-zip") )
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
func (*Archive) ExtractSeveral ¶
func (a *Archive) ExtractSeveral(indices []int64, ec *ExtractCallback) error
func (*Archive) GetArchiveFormat ¶
func (*Archive) GetItemCount ¶
type ExtractCallback ¶
type ExtractCallback struct {
// contains filtered or unexported fields
}
func NewExtractCallback ¶
func NewExtractCallback(funcs ExtractCallbackFuncs) (*ExtractCallback, error)
func (*ExtractCallback) Errors ¶
func (ec *ExtractCallback) Errors() []error
func (*ExtractCallback) Free ¶
func (ec *ExtractCallback) Free()
type ExtractCallbackFuncs ¶
type InStream ¶
func NewInStream ¶
func NewInStream(reader ReaderAtCloser, ext string, size int64) (*InStream, error)
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (*Item) GetArchiveIndex ¶
func (*Item) GetBoolProperty ¶
func (i *Item) GetBoolProperty(id PropertyIndex) (bool, bool)
func (*Item) GetStringProperty ¶
func (i *Item) GetStringProperty(id PropertyIndex) (string, bool)
func (*Item) GetUInt64Property ¶
func (i *Item) GetUInt64Property(id PropertyIndex) (uint64, bool)
type OutStream ¶
type OutStream struct { ChunkSize int64 // contains filtered or unexported fields }
func NewOutStream ¶
func NewOutStream(writer io.WriteCloser) (*OutStream, error)
type PropertyIndex ¶
type PropertyIndex int32
var ( // Packed Size PidPackSize PropertyIndex = C.kpidPackSize // Attributes PidAttrib PropertyIndex = C.kpidAttrib // Created PidCTime PropertyIndex = C.kpidCTime // Accessed PidATime PropertyIndex = C.kpidATime // Modified PidMTime PropertyIndex = C.kpidMTime // Solid PidSolid PropertyIndex = C.kpidSolid // Encrypted PidEncrypted PropertyIndex = C.kpidEncrypted // User PidUser PropertyIndex = C.kpidUser // Group PidGroup PropertyIndex = C.kpidGroup // Comment PidComment PropertyIndex = C.kpidComment // Physical Size PidPhySize PropertyIndex = C.kpidPhySize // Headers Size PidHeadersSize PropertyIndex = C.kpidHeadersSize // Checksum PidChecksum PropertyIndex = C.kpidChecksum // Characteristics PidCharacts PropertyIndex = C.kpidCharacts // Creator Application PidCreatorApp PropertyIndex = C.kpidCreatorApp // Total Size PidTotalSize PropertyIndex = C.kpidTotalSize // Free Space PidFreeSpace PropertyIndex = C.kpidFreeSpace // Cluster Size PidClusterSize PropertyIndex = C.kpidClusterSize // Label PidVolumeName PropertyIndex = C.kpidVolumeName // FullPath PidPath PropertyIndex = C.kpidPath // IsDir PidIsDir PropertyIndex = C.kpidIsDir // Uncompressed Size PidSize PropertyIndex = C.kpidSize // Symbolic link destination PidSymLink PropertyIndex = C.kpidSymLink // POSIX attributes PidPosixAttrib PropertyIndex = C.kpidPosixAttrib )
Click to show internal directories.
Click to hide internal directories.