public class FileDownloaderImpl extends java.lang.Object implements FileDownloader
Constructor and Description |
---|
FileDownloaderImpl(java.util.List<? extends DownloadableFileDescription> fileDescriptions,
Project project,
javax.swing.JComponent parentComponent,
java.lang.String presentableDownloadName) |
Modifier and Type | Method and Description |
---|---|
VirtualFile [] |
download() |
java.util.List<Pair<java.io.File,DownloadableFileDescription>> |
download(java.io.File targetDir)
Download files synchronously.
|
java.util.List<Pair<VirtualFile,DownloadableFileDescription>> |
downloadAndReturnWithDescriptions() |
java.util.List<VirtualFile> |
downloadFilesWithProgress(java.lang.String targetDirectoryPath,
Project project,
javax.swing.JComponent parentComponent)
Download files with modal progress dialog.
|
java.util.List<Pair<VirtualFile,DownloadableFileDescription>> |
downloadWithProgress(java.lang.String targetDirectoryPath,
Project project,
javax.swing.JComponent parentComponent)
Same as
FileDownloader.downloadFilesWithProgress(java.lang.String, com.intellij.openapi.project.Project, javax.swing.JComponent) but returns downloaded files along with corresponding descriptions. |
FileDownloader |
toDirectory(java.lang.String directoryForDownloadedFilesPath) |
public FileDownloaderImpl(java.util.List<? extends DownloadableFileDescription> fileDescriptions, Project project, javax.swing.JComponent parentComponent, java.lang.String presentableDownloadName)
public java.util.List<VirtualFile> downloadFilesWithProgress(java.lang.String targetDirectoryPath, Project project, javax.swing.JComponent parentComponent)
FileDownloader
downloadFilesWithProgress
in interface FileDownloader
targetDirectoryPath
- target directory for downloaded files. If null
a file chooser will be shown to select target directory.project
- project instance used to show the progress windowparentComponent
- parent component for the progress windownull
if the downloading process was failed or canceledpublic java.util.List<Pair<VirtualFile,DownloadableFileDescription>> downloadWithProgress(java.lang.String targetDirectoryPath, Project project, javax.swing.JComponent parentComponent)
FileDownloader
FileDownloader.downloadFilesWithProgress(java.lang.String, com.intellij.openapi.project.Project, javax.swing.JComponent)
but returns downloaded files along with corresponding descriptions.downloadWithProgress
in interface FileDownloader
public java.util.List<Pair<java.io.File,DownloadableFileDescription>> download(java.io.File targetDir) throws java.io.IOException
FileDownloader
Task
).download
in interface FileDownloader
targetDir
- target directory for downloaded filesjava.io.IOException
- On errors.public FileDownloader toDirectory(java.lang.String directoryForDownloadedFilesPath)
toDirectory
in interface FileDownloader
public VirtualFile [] download()
download
in interface FileDownloader
public java.util.List<Pair<VirtualFile,DownloadableFileDescription>> downloadAndReturnWithDescriptions()
downloadAndReturnWithDescriptions
in interface FileDownloader