递归删除文件

private void delUpgradeFolder(String upgradeFolderPath) { File folder = new File(upgradeFolderPath); if(folder.isDirectory()) { File[] flist = folder.listFiles(); for (File file : flist) { delUpgradeFolder(file.getPath()); file.delete(); } } folder.delete(); }

你可能感兴趣的:(String,File)