File myPath = new File("/tmp/a/b");myPath.mkdir(); myPath.mkdirs()
private void delFolder(File f) throws java.io.IOException { if (f.isDirectory()) { File[] fs=f.listFiles(); for (int i=0;i<fs.length;i++) { delFolder(fs[i]); } } if (!(f.delete())) { throw new java.io.IOException("cann't delete "+f.getPath()); } }