Here you can find the source of recursivelyDelete(String loc)
public static void recursivelyDelete(String loc)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static void recursivelyDelete(File f) { if (f.isDirectory()) for (File f2 : f.listFiles()) recursivelyDelete(f2);//from www . j a v a 2s .co m f.delete(); } public static void recursivelyDelete(String loc) { recursivelyDelete(new File(loc)); } }