// Windows returns a list of the existing acme windows.

Windows returns a list of the existing acme windows.
// Windows returns a list of the existing acme windows .
func Windows() ([]WinInfo, error) {
	fsysOnce.Do(mountAcme)
	if fsysErr != nil {
		return nil, fsysErr
	}
	index, err := fsys.Open("index", plan9.OREAD)
	if err != nil {
		return nil, err
	}
	defer index.Close()
	data, err := ioutil.ReadAll(index)
	if err != nil {
		return nil, err
	}
	var info []WinInfo
	for _, line := range strings.Split(string(data), "\n") {
		f := strings.Fields(line)
		if len(f) < 6 {
			continue
		}
		n, _ := strconv.Atoi(f[0])
		info = append(info, WinInfo{n, f[5]})
	}
	return info, nil
}
func Windows ( ) ( [ ] WinInfo , error ) { fsysOnce . Do ( mountAcme ) if fsysErr != nil { return nil , fsysErr } index , err := fsys . Open ( " " , plan9 . OREAD ) if err != nil { return nil , err } defer index . Close ( ) data , err := ioutil . ReadAll ( index ) if err != nil { return nil , err } var info [ ] WinInfo for _ , line := range strings . Split ( string ( data ) , " \n " ) { f := strings . Fields ( line ) if len ( f ) < 6 { continue } n , _ := strconv . Atoi ( f [ 0 ] ) info = append ( info , WinInfo { n , f [ 5 ] } ) } return info , nil }
Windows returns a list of the existing acme windows.
Windows returns a list of the existing acme windows .