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 }