List of utility methods to do Delete Directory
boolean | deleteDirectory(File directory) delete Directory return deleteDirectory(directory, false);
|
void | deleteDirectory(File directory) Deletes a directory recursively. if (!directory.exists()) { return; if (!isSymlink(directory)) { cleanDirectory(directory); if (!directory.delete()) { String message = "Unable to delete directory " + directory + "."; ... |
void | deleteDirectory(File directory) delete Directory if (!directory.exists()) return; if (!isSymlink(directory)) cleanDirectory(directory); if (!directory.delete()) { String message = "Unable to delete directory " + directory + "."; throw new IOException(message); |
void | deleteDirectory(File directory) delete Directory if (directory != null) {
deleteInDirectory(directory);
directory.delete();
|
boolean | deleteDirectory(File directory) Delete directory. try { if (directory.isDirectory()) { File[] files = directory.listFiles(); for (int i = 0; i < files.length; i++) { File file = files[i]; if (file.isFile()) { boolean deletion = file.delete(); if (!deletion) ... |
void | deleteDirectory(File directory) Deletes a directory recursively. if (!directory.exists()) { return; if (!directory.delete()) { String message = "Unable to delete directory " + directory + "."; throw new IOException(message); |
void | deleteDirectory(File directory) delete Directory if (!directory.exists()) { return; if (directory.isFile()) { directory.delete(); return; for (File file : directory.listFiles()) { ... |
void | deleteDirectory(File directory) delete Directory if (!directory.exists()) { return; if (!isSymlink(directory)) { cleanDirectory(directory); if (!directory.delete()) { String message = "Unable to delete directory " + directory + "."; ... |
void | deleteDirectory(File directory) delete Directory if (!directory.exists()) { return; forceDelete(directory); if (!directory.delete()) { throw new IOException("Unable to delete directory " + directory + "."); |
void | deleteDirectory(File directory) Delete all the files in a directory and then delete the directory itself. File[] firstDirectoryFiles = directory.listFiles(); if (firstDirectoryFiles != null) { for (File file : firstDirectoryFiles) { file.delete(); directory.delete(); |