func ReadBundleDir(path string) (dir *BundleDir, err error) {
	dir = &BundleDir{Path: path}
	file, err := os.Open(dir.join("bundle.yaml"))
	if err != nil {
		return nil, err
	}
	dir.data, dir.containsOverlays, err = readBaseFromMultidocBundle(file)
	file.Close()
	if err != nil {
		return nil, err
	}
	readMe, err := ioutil.ReadFile(dir.join("README.md"))
	if err != nil {
		return nil, fmt.Errorf("cannot read README file: %v", err)
	}
	dir.readMe = string(readMe)
	return dir, nil
}
// ReadBundleDir returns a BundleDir representing an expanded
// bundle directory. It does not verify the bundle data.
ReadBundleDir returns a BundleDir representing an expanded
bundle directory. It does not verify the bundle data.
// ReadBundleDir returns a BundleDir representing an expanded // bundle directory . It does not verify the bundle data .
func ReadBundleDir(path string) (dir *BundleDir, err error) {
	dir = &BundleDir{Path: path}
	file, err := os.Open(dir.join("bundle.yaml"))
	if err != nil {
		return nil, err
	}
	dir.data, dir.containsOverlays, err = readBaseFromMultidocBundle(file)
	file.Close()
	if err != nil {
		return nil, err
	}
	readMe, err := ioutil.ReadFile(dir.join("README.md"))
	if err != nil {
		return nil, fmt.Errorf("cannot read README file: %v", err)
	}
	dir.readMe = string(readMe)
	return dir, nil
}
func ReadBundleDir ( path string ) ( dir * BundleDir , err error ) { dir = & BundleDir { Path : path } file , err := os . Open ( dir . join ( " " ) ) if err != nil { return nil , err } dir . data , dir . containsOverlays , err = readBaseFromMultidocBundle ( file ) file . Close ( ) if err != nil { return nil , err } readMe , err := ioutil . ReadFile ( dir . join ( " " ) ) if err != nil { return nil , fmt . Errorf ( " " , err ) } dir . readMe = string ( readMe ) return dir , nil }
ReadBundleDir returns a BundleDir representing an expanded
bundle directory.
ReadBundleDir returns a BundleDir representing an expanded bundle directory .