Android examples for java.io:File Directory
delete directory Recursive
//package com.java2s; import java.io.File; public class Main { public static void deleteRecursive(File fileOrDirectory) { if (fileOrDirectory.isDirectory()) { for (File child : fileOrDirectory.listFiles()) { deleteRecursive(child);//from www . j a va 2 s . c o m } } fileOrDirectory.delete(); } }