コード例 #1
0
  /**
   * Copy all loaded files into installation folder.
   *
   * @return <code>true</code> if files are copied; <code>false</code> otherwise
   */
  private boolean moveDownloadedContentToInstallationFolder() {
    boolean isMoved = false;
    FilesUtility.ensureDirectoryExists(filesStructure.installationFolder());
    try {
      FilesUtility.copy(filesStructure.downloadFolder(), filesStructure.installationFolder());
      isMoved = true;
    } catch (IOException e) {
      e.printStackTrace();
    }

    return isMoved;
  }
コード例 #2
0
 /** Remove temporary files */
 private void cleanUp() {
   FilesUtility.delete(filesStructure.downloadFolder());
 }
コード例 #3
0
 /**
  * Remove old version of download folder and create a new one.
  *
  * @param folder absolute path to download folder
  */
 private void recreateDownloadFolder(final String folder) {
   FilesUtility.delete(folder);
   FilesUtility.ensureDirectoryExists(folder);
 }