// Summon is the main comnand invocation
Summon is the main comnand invocation
// Summon is the main comnand invocation
func (d *Driver) Summon(opts ...Option) (string, error) {
	if d == nil {
		return "", fmt.Errorf("Driver cannot be nil")
	}
	err := d.Configure(opts...)
	if err != nil {
		return "", err
	}
	destination := d.opts.destination
	if destination == "-" {
		destination = ""
	}
	if d.opts.all {
		return destination, d.box.Walk(func(path string, info file.File) error {
			_, err := d.copyOneFile(info, "")
			return err
		})
	}
	filename := filepath.Clean(d.opts.filename)
	filename = d.resolveAlias(filename)
	if d.box.HasDir(filename) {
		return destination,
			d.box.WalkPrefix(filename, func(path string, info file.File) error {
				_, err := d.copyOneFile(info, filename)
				return err
			})
	}
	boxedFile, err := d.box.Open(filename)
	if err != nil {
		return "", err
	}
	return d.copyOneFile(boxedFile, "")
}
func ( d * Driver ) Summon ( opts ... Option ) ( string , error ) { if d == nil { return " " , fmt . Errorf ( " " ) } err := d . Configure ( opts ... ) if err != nil { return " " , err } destination := d . opts . destination if destination == " " { destination = " " } if d . opts . all { return destination , d . box . Walk ( func ( path string , info file . File ) error { _ , err := d . copyOneFile ( info , " " ) return err } ) } filename := filepath . Clean ( d . opts . filename ) filename = d . resolveAlias ( filename ) if d . box . HasDir ( filename ) { return destination , d . box . WalkPrefix ( filename , func ( path string , info file . File ) error { _ , err := d . copyOneFile ( info , filename ) return err } ) } boxedFile , err := d . box . Open ( filename ) if err != nil { return " " , err } return d . copyOneFile ( boxedFile , " " ) }
Summon is the main comnand invocation
Summon is the main comnand invocation
// User wants to extract a subdirectory