void (File dir) { FileUtil.delete(dir); // cannot use reliably the result of the com.intellij.openapi.util.io.FileUtil.delete() method // because com.intellij.openapi.util.io.FileUtilRt.deleteRecursivelyNIO() does not honor this contract if (dir.exists()) { System.err.println("Cannot delete " + dir); //printDirectoryContent(myDir); dir.deleteOnExit(); } }