Here you can find the source of deleteFolder(File folder)
Parameter | Description |
---|---|
folder | the folder to delete |
public static void deleteFolder(File folder)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /**/* ww w . j av a 2 s . c o m*/ * Deletes a folder recursively. * * @param folder the folder to delete * @since 0.3.0 */ public static void deleteFolder(File folder) { for (File f : folder.listFiles()) { if (f.isDirectory()) { deleteFolder(f); } else { f.delete(); } } } }