/** * Creates a marker file in the archive directory - if it still * exists and contains any stale files. * @param archive the File for the archive to mark */ public static void markDeletedArchive(final Archive archive) { if ( ! (archive instanceof FileArchive)) { return; } final File archiveFile = new File(archive.getURI()); markDeletedArchive(archiveFile); }
/** * delete the archive */ @Override public boolean delete() { // delete the directory structure... try { final boolean result = deleteDir(archive); /* * Create the stale file marker file, if needed. */ StaleFileManager.Util.markDeletedArchive(this); return result; } catch (IOException e) { return false; } }