删除指定文件夹下的所有文件

public static void deleteFiles(String path){
    File file = new File(path);
    File[] fileList = file.listFiles();
    for (int i = 0; i < fileList.length; i++) {
        fileList[i].delete();
    }
}
原文地址:https://www.cnblogs.com/lxcmyf/p/5715851.html