Class HeadlessFileDAO
java.lang.Object
com.compomics.software.autoupdater.FileDAO
com.compomics.software.autoupdater.HeadlessFileDAO
HeadlessFileDAO.
- Author:
- Davy Maddelein
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateDesktopShortcut(MavenJarFile file, String iconName, String toolName, boolean deleteOldShortcut) Creates a new Desktop Shortcut to the Maven jar file, atm windows only.getLocationToDownloadOnDisk(String targetDownloadFolder) Try to find an at least somewhat sane location to download files to.Methods inherited from class com.compomics.software.autoupdater.FileDAO
addShortcutAtDeskTop, addShortcutAtDeskTop, getMavenJarFileFromFolderWithArtifactId, unGzipAndUntarFile, unzipFile, writeStreamToDisk
-
Constructor Details
-
HeadlessFileDAO
public HeadlessFileDAO()
-
-
Method Details
-
createDesktopShortcut
public boolean createDesktopShortcut(MavenJarFile file, String iconName, String toolName, boolean deleteOldShortcut) throws IOException Creates a new Desktop Shortcut to the Maven jar file, atm windows only.- Specified by:
createDesktopShortcutin classFileDAO- Parameters:
file- the Maven jarfile to make a shortcut toiconName- the name of the icon file in the resources foldertoolName- the name of the tool, e.g., PeptideShakerdeleteOldShortcut- if previous shortcuts containing the Maven jar file artifact id should be removed- Returns:
- true id the shortcut was created (?)
- Throws:
IOException- if an IOException occurs
-
getLocationToDownloadOnDisk
Try to find an at least somewhat sane location to download files to.- Specified by:
getLocationToDownloadOnDiskin classFileDAO- Parameters:
targetDownloadFolder- first place to check if it is a possible download location- Returns:
- the folder to download in (in best case scenario this is the passed parameter targetDownloadFolder)
- Throws:
IOException- if an IOException occurs
-