public static File createTempDir(String prefix) throws IOException { return createTempDir(getSystemTempDir(), prefix); }
public static File createTempDir() throws IOException { return createTempDir("tmp"+random.nextInt()); }
/** * Deletes a directory recursively. * * @param directory * directory to delete * @throws IOException * in case deletion is unsuccessful */ private static void deleteDirectory(File directory) throws IOException { if (!directory.exists()) { return; } cleanDirectory(directory); if (!directory.delete()) { String message = "Unable to delete directory " + directory + "."; throw new IOException(message); } }
assert file != null; if (file.isDirectory()) { deleteDirectory(file); } else { if (!file.exists()) {
File file = files[i]; try { forceDelete(file); } catch (IOException ioe) { exception = ioe;
private static final File createComponentRepositoryRoot() { try { return FileSystemHelper.createTempDir("repository"); } catch (IOException ioe) { throw new UncheckedException(ioe); } }
/** * Deletes a directory recursively. * * @param directory * directory to delete * @throws IOException * in case deletion is unsuccessful */ private static void deleteDirectory(File directory) throws IOException { if (!directory.exists()) { return; } cleanDirectory(directory); if (!directory.delete()) { String message = "Unable to delete directory " + directory + "."; throw new IOException(message); } }
assert file != null; if (file.isDirectory()) { deleteDirectory(file); } else { if (!file.exists()) {
File file = files[i]; try { forceDelete(file); } catch (IOException ioe) { exception = ioe;
public static File createTempDir() throws IOException { return createTempDir(getSystemTempDir(), "tmp"); }
.createTempDir("jbiDirExtractedFromComponentJar"); ZipHelper.extractEntriesFromArchive(executionJar, JBI_DIR_NAME + File.separator, jbiDirExtractedFromComponentJar);