private static void collectContentsRecursively(Entry e, List<? super Content> result) {
    if (e.isDirectory()) {
      for (Entry child : e.getChildren()) {
        collectContentsRecursively(child, result);
      }
    }
    else {
      result.add(e.getContent());
    }
  }
private static void collectContentsRecursively(Entry e, List<? super Content> result)