Here you can find the source of delDir(String path)
Parameter | Description |
---|---|
path | a parameter |
public static synchronized void delDir(String path)
//package com.java2s; import java.io.*; public class Main { /**/* w w w. j a v a 2s . c o m*/ * @param path */ public static synchronized void delDir(String path) { File dir = new File(path); if (dir.exists()) { dir.delete(); } } /** * file delete method * * @param file */ public static void delete(File file) { if (file != null) { if (file.exists()) { file.delete(); } } } }