Usages of

com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Item.downloadFile(?, ?)
public void downloadFiles(List<String> paths, String serverPath, String localDirectory) { for (String path : paths) { Item item = versionClient.getItem(path); if (item.getItemType() == ItemType.FILE) { String filePath = localDirectory + "\\" + item.getServerItem().replace(serverPath, ""); item.downloadFile(versionClient, filePath); } } }
/* * (non-Javadoc) * * @see * com.microsoft.tfs.client.clc.vc.diff.launch.DiffLaunchItem#getFilePath() */ @Override public String getFilePath() throws CLCException { if (filePath == null) { // Make sure we have an item. final Item item = getItem(); Check.notNull(item, "item"); //$NON-NLS-1$ filePath = getVersionedTempFileFullPath(item.getServerItem(), item.getItemType(), version); item.downloadFile(client, filePath); } return filePath; }
/** * {@inheritDoc} */ @Override public void export(Map<File, Revision> revisionMap, Map<File, File> destinationMap) throws ConfigurationManagementException { for (Map.Entry<File, Revision> entry : revisionMap.entrySet()) { File file = entry.getKey(); Revision revision = entry.getValue(); File destinationFile = destinationMap.get(file); String itemPath = getPathFromRevision(revision); VersionSpec versionSpec = VersionSpec.parseSingleVersionFromSpec(revision.getStringRepresentation(), null); Item item = getWorkspace().getClient().getItem(itemPath, versionSpec, DeletedState.NON_DELETED, GetItemsOptions.INCLUDE_SOURCE_RENAMES); // Can't download a directory if (item.getItemType() == ItemType.FILE) { item.downloadFile(getWorkspace().getClient(), destinationFile.getAbsolutePath()); } } }
public void downloadFile(Item item, String downloadTo) throws IOException { item.downloadFile(versionControlClient, downloadTo); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes