code: func (dh *DownloadHandler) dirInfo(ctx context.Context, dir blob.Ref) (fi fileInfo, err error) {
  	rc, _, err := dh.Fetcher.Fetch(ctx, dir)
  	if err != nil {
  		return fi, fmt.Errorf("could not fetch %v: %v", dir, err)
  	}
  	b, err := schema.BlobFromReader(dir, rc)
  	rc.Close()
  	if err != nil {
  		return fi, fmt.Errorf("could not read %v as blob: %v", dir, err)
  	}
  	tp := b.Type()
  	if tp != "directory" {
  		return fi, errNotDir
  	}
  	dr, err := schema.NewDirReader(ctx, dh.Fetcher, dir)
  	if err != nil {
  		return fi, fmt.Errorf("could not open %v as directory: %v", dir, err)
  	}
  	children, err := dr.StaticSet(ctx)
  	if err != nil {
  		return fi, fmt.Errorf("could not get dir entries of %v: %v", dir, err)
  	}
  	return fileInfo{
  		isDir:    true,
  		name:     b.FileName(),
  		modtime:  b.ModTime(),
  		children: children,
  	}, nil
  }
docs: // dirInfo checks whether maybeDir is a directory schema, and if so returns the
  // corresponding fileInfo. If dir is another kind of (valid) file schema, errNotDir
  // is returned.