// List lists the content of the data tree.
List lists the content of the data tree.
// List lists the content of the data tree .
func (d *Driver) List(opts ...Option) ([]string, error) {
	d.Configure(opts...)
	list := d.box.List()
	if d.opts.tree {
		_, assetDir := filepath.Split(d.box.Path)
		rootTree := &fileTree{
			Tree:     gotree.New(assetDir),
			children: map[string]*fileTree{},
		}
		for _, path := range list {
			rootTree.addPath(path)
		}
		return []string{strings.TrimSpace(rootTree.Print())}, nil
	}
	return list, nil
}
func ( d * Driver ) List ( opts ... Option ) ( [ ] string , error ) { d . Configure ( opts ... ) list := d . box . List ( ) if d . opts . tree { _ , assetDir := filepath . Split ( d . box . Path ) rootTree := & fileTree { Tree : gotree . New ( assetDir ) , children : map [ string ] * fileTree { } , } for _ , path := range list { rootTree . addPath ( path ) } return [ ] string { strings . TrimSpace ( rootTree . Print ( ) ) } , nil } return list , nil }
List lists the content of the data tree.
List lists the content of the data tree .