Here you can find the source of delete(String root)
Parameter | Description |
---|---|
root | a parameter |
public static Boolean delete(String root)
//package com.java2s; import java.io.File; public class Main { /**/*from www. j av a2s. c o m*/ * Delete File or Folder recursively * * @param root * @return */ public static Boolean delete(String root) { if (root == null) { return false; } File f = new File(root); if (f.isDirectory()) { for (File tmp : f.listFiles()) { delete(tmp.getAbsolutePath()); } } return f.delete(); } }