func DirExists(path string) (bool, error) {
	pi, err := pathExists(path)
	if err != nil {
		return false, err
	}

	if pi.Exists && !pi.IsDir {
		return false, ex.New("Path exists but is not a directory", ex.OptMessagef("Path: %q", path))
	}

	return pi.Exists, nil
}
// DirExists determines if a path exists and is a directory (not a file).
DirExists determines if a path exists and is a directory (not a file).
// DirExists determines if a path exists and is a directory ( not a file ) .
func DirExists(path string) (bool, error) {
	pi, err := pathExists(path)
	if err != nil {
		return false, err
	}
	if pi.Exists && !pi.IsDir {
		return false, ex.New("Path exists but is not a directory", ex.OptMessagef("Path: %q", path))
	}
	return pi.Exists, nil
}
func DirExists ( path string ) ( bool , error ) { pi , err := pathExists ( path ) if err != nil { return false , err } if pi . Exists && ! pi . IsDir { return false , ex . New ( " " , ex . OptMessagef ( " " , path ) ) } return pi . Exists , nil }
DirExists determines if a path exists and is a directory (not a file).
DirExists determines if a path exists and is a directory ( not a file ) .