Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor interface { List() (*ExtractorResult, error) ExtractTo(dest string) (*ExtractorResult, error) }
An Extractor can list the contents of a DMG and extract it to a folder
func New ¶
func New(dmgpath string, o ...ExtractorOpt) Extractor
New creates a new extractor with the specified options. It doesn't do anything until one of its methods are called.
type ExtractorOpt ¶
type ExtractorOpt func(opts *extractorOpts)
An ExtractorOpt changes the behavior of a dmg extractor.
var ExtractSLA ExtractorOpt = func(opts *extractorOpts) { opts.extractSLA = true }
ExtractSLA instructs the dmg extractor to parse any service level agreement stored in the DMG file.
func WithConsumer ¶
func WithConsumer(consumer *state.Consumer) ExtractorOpt
WithConsumer hooks up logging and progress to a custom consumer. Otherwise, a silent consumer will be used.
func WithMountFolder ¶
func WithMountFolder(mountFolder string) ExtractorOpt
WithMountFolder specifies a mount folder for the disk image. If none is specified, a temporary path will be generated.
func WithProgressTotalBytes ¶
func WithProgressTotalBytes(startProgressWithTotalBytes func(totalBytes int64), endProgress func()) ExtractorOpt
Click to show internal directories.
Click to hide internal directories.