Here you can find the source of deleteFolder(String path)
public static void deleteFolder(String path) throws IOException
//package com.java2s; //License from project: LGPL import java.io.File; import java.io.IOException; public class Main { public static void deleteFolder(String path) throws IOException { final File delFolder = new File(path); if (!(delFolder.delete())) { throw new IOException("Could not delete temp folder: " + path); }//from ww w.j a v a 2s .co m } }