List of utility methods to do Delete Directory on Exit
void | deleteDirectoryOnExit(File directory) Schedules a directory recursively for deletion on JVM exit. if (!directory.exists()) { return; directory.deleteOnExit(); |
void | deleteDirectoryOnExit(File directory) delete Directory On Exit if (!directory.exists()) { return; cleanDirectoryOnExit(directory); directory.deleteOnExit(); |
void | deleteDirectoryOnExit(File directory) delete Directory On Exit if (!directory.exists()) { return; directory.deleteOnExit(); if (!isSymlink(directory)) { cleanDirectoryOnExit(directory); |
void | deleteDirectoryOnExit(final File dir) Instructs Java to recursively delete the given directory (dir) and its contents when the JVM exits. dir.deleteOnExit(); if (dir.isDirectory()) { File[] childFiles = dir.listFiles(); if (childFiles != null) { for (File f : childFiles) { deleteDirectoryOnExit(f); |