我正在尝试获取给定TFS项目的子文件夹名称。截至目前,我能够连接到TFS服务器并列出所有项目。请帮我看看如何获取每个TFS项目的子文件夹名称。
TFSTeamProjectCollection tpc = connectToTFS();
// Enumerate the Team Projects.
for (Project project : tpc.getWorkItemClient().getProjects())
{
System.out.println(project.getName());
}
public static TFSTeamProjectCollection connectToTFS() throws URIException, SQLException
{
TFSTeamProjectCollection tpc = null;
Credentials credentials;
credentials = new UsernamePasswordCredentials("USERNAME","PASSWORD");
tpc = new TFSTeamProjectCollection(URIUtils.newURI("COLLECTION_URL"), credentials);
return tpc;
}
答案 0 :(得分:0)
使用Workspace类的GetExtendedItems。
getExtendedItems
public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options)
您可以使用Git-tf项目作为在Java中使用TFS-SDK的参考。