Ejemplo n.º 1
0
func newLocation(s *store.Store) (*location, error) {
	if s == nil {
		return nil, ErrStoreOffline
	}
	all, err := s.ListDirs()
	if err != nil {
		return nil, err
	}

	loc := &location{all: all}
	loc.listing = newListing(modeLocation, loc)
	return loc, nil
}