File file = new File(folder);
try {
FileUtils.deleteDirectory(file);
<BUG>} catch (IOException ignore) {
}
if(!file.mkdir()) {
throw new IllegalStateException("Error to mkdir for folder " + folder
+ "please check if any other process is still running.");
}</BUG>
}

File file = new File(folder);
try {
FileUtils.deleteDirectory(file);
} catch (IOException ignore) {
return false;
}
return file.mkdir();
}
