/** * Method description * * * @param file * * @throws IOException */ public static void delete(File file) throws IOException { delete(file, false); }
/** * Method description * * * @param file * * @throws IOException */ public static void delete(File file) throws IOException { delete(file, false); }
/** * Method description * * * @param directory * * @throws IOException */ @Override public void destroy(File directory) throws IOException { if (logger.isInfoEnabled()) { logger.info("destroy directory {}", directory.getPath()); } IOUtil.delete(directory); } }
/** * Method description * * * @param directory * * @throws IOException */ @Override public void destroy(File directory) throws IOException { if (logger.isInfoEnabled()) { logger.info("destroy directory {}", directory.getPath()); } IOUtil.delete(directory); } }
delete(child, silent);
delete(child, silent);
/** * Method description * * * @throws Exception */ @After public void tearDownTest() throws Exception { try { preTearDown(); clearSubject(); } finally { try { IOUtil.delete(tempDirectory); } catch (IOException e) { Logger.getGlobal().warning(String.format("deleting temp <%s> failed: %s", tempDirectory.getAbsolutePath(), e.getMessage())); } } }
IOUtil.delete(file, true);
/** * Method description * * * @param archive * @param outputDirectory * @param force * * @throws IOException */ @Override public void extract(File archive, File outputDirectory, boolean force) throws IOException { if (!outputDirectory.exists()) { IOUtil.mkdirs(outputDirectory); extractAndCreateProperties(archive, outputDirectory); } else if (force || isModified(archive, outputDirectory)) { IOUtil.delete(outputDirectory); IOUtil.mkdirs(outputDirectory); extractAndCreateProperties(archive, outputDirectory); } }
/** * Method description * * * @param archive * @param outputDirectory * @param force * * @throws IOException */ @Override public void extract(File archive, File outputDirectory, boolean force) throws IOException { if (!outputDirectory.exists()) { IOUtil.mkdirs(outputDirectory); extractAndCreateProperties(archive, outputDirectory); } else if (force || isModified(archive, outputDirectory)) { IOUtil.delete(outputDirectory); IOUtil.mkdirs(outputDirectory); extractAndCreateProperties(archive, outputDirectory); } }