func ListFile(apiClient pfs.ApiClient, repoName string, commitID string, path string, shard uint64, modulus uint64) ([]*pfs.FileInfo, error) { fileInfos, err := apiClient.ListFile( context.Background(), &pfs.ListFileRequest{ File: &pfs.File{ Commit: &pfs.Commit{ Repo: &pfs.Repo{ Name: repoName, }, Id: commitID, }, Path: path, }, Shard: &pfs.Shard{ Number: shard, Modulo: modulus, }, }, ) if err != nil { return nil, err } return fileInfos.FileInfo, nil }