/** * Closes the replicator, deleting all temporary files. */ @Override public void close() { // Delete the temporary files synchronized (copies) { while (copies.size() > 0) { final File file = (File) removeFile(); deleteFile(file); } } // Clean up the temp directory, if it is empty if (tempDir != null && tempDir.exists() && tempDir.list().length == 0) { tempDir.delete(); tempDir = null; } }
/** * Closes the replicator, deleting all temporary files. */ @Override public void close() { // Delete the temporary files synchronized (copies) { while (copies.size() > 0) { final File file = (File) removeFile(); deleteFile(file); } } // Clean up the temp directory, if it is empty if (tempDir != null && tempDir.exists() && tempDir.list().length == 0) { tempDir.delete(); tempDir = null; } }
/** * Closes the replicator, deleting all temporary files. */ @Override public void close() { // Delete the temporary files synchronized (copies) { while (copies.size() > 0) { final File file = (File) removeFile(); deleteFile(file); } } // Clean up the temp directory, if it is empty if (tempDir != null && tempDir.exists() && tempDir.list().length == 0) { tempDir.delete(); tempDir = null; } }
/** * Closes the replicator, deleting all temporary files. */ @Override public void close() { // Delete the temporary files synchronized (copies) { while (copies.size() > 0) { final File file = (File) removeFile(); deleteFile(file); } } // Clean up the temp directory, if it is empty if (tempDir != null && tempDir.exists() && tempDir.list().length == 0) { tempDir.delete(); tempDir = null; } }