Here you can find the source of cleanDirectory(File currentDir)
Parameter | Description |
---|---|
currentDir | the current dir |
public static void cleanDirectory(File currentDir)
//package com.java2s; //License from project: LGPL import java.io.File; public class Main { /**//w w w. j a v a 2 s.co m * Clean directory and it's files * * @param currentDir * the current dir */ public static void cleanDirectory(File currentDir) { File[] files = currentDir.listFiles(); for (File file : files) { file.delete(); } currentDir.delete(); } }