Here you can find the source of recursiveDeleteFile(File f)
public static void recursiveDeleteFile(File f)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static void recursiveDeleteFile(File f) { File[] children = f.listFiles(); if (children != null) { for (int i = 0; i < children.length; i++) recursiveDeleteFile(children[i]); }/*from w w w. j a va 2s . c o m*/ f.delete(); } }