/** * Deletes a directory and its contents. This will fail if there are any file locks or if the directory cannot be emptied. * * @param directory * directory to delete * @throws IOException * if directory cannot be deleted * @return true if directory was successfully deleted; false if directory did not exist */ public static boolean deleteDirectory(String directory) throws IOException { return deleteDirectory(directory, false); }
/** * Deletes a directory and its contents. This will fail if there are any file locks or if the directory cannot be emptied. * * @param directory * directory to delete * @throws IOException * if directory cannot be deleted * @return true if directory was successfully deleted; false if directory did not exist */ public static boolean deleteDirectory(String directory) throws IOException { return deleteDirectory(directory, false); }