+
+ params := ResourceListParams{
+ Count: "none",
+ Filters: filters,
+ Order: "uuid",
+ Select: []string{"uuid", "name", "modified_at", "properties"},
+ Limit: &pagesize,
+ }
+
+ for {
+ // The groups content endpoint returns
+ // Collection and Group (project)
+ // objects. This function only accesses the
+ // UUID, Name, and ModifiedAt fields. Both
+ // collections and groups have those fields,
+ // so it is easier to just treat the
+ // ObjectList that comes back as a
+ // CollectionList.
+ var resp CollectionList
+ err = fs.RequestAndDecode(&resp, "GET", "arvados/v1/groups/"+uuid+"/contents", nil, params)
+ if err != nil {
+ return nil, err
+ }
+ if len(resp.Items) == 0 {
+ break
+ }
+ for _, i := range resp.Items {
+ if fs.forwardSlashNameSubstitution != "" {
+ i.Name = strings.Replace(i.Name, "/", fs.forwardSlashNameSubstitution, -1)
+ }
+ if !permittedName(i.Name) {
+ continue
+ }
+ if strings.Contains(i.UUID, "-j7d0g-") {
+ inodes = append(inodes, fs.newProjectDir(parent, i.Name, i.UUID, &Group{
+ UUID: i.UUID,
+ Name: i.Name,
+ ModifiedAt: i.ModifiedAt,
+ Properties: i.Properties,
+ }))
+ } else if strings.Contains(i.UUID, "-4zz18-") {
+ inodes = append(inodes, fs.newDeferredCollectionDir(parent, i.Name, i.UUID, i.ModifiedAt, i.Properties))
+ } else {
+ log.Printf("group contents: unrecognized UUID in response: %q", i.UUID)
+ return nil, ErrInvalidArgument
+ }