标签:
public static void deleteAllFile(){
String path = Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+"文件夹名称";
deleteFile(new File(path));
}
public static void deleteFile(File oldPath) {
if (oldPath.isDirectory()) {
File[] files = oldPath.listFiles();
for (File file : files) {
deleteFile(file);
file.delete();
}
}else{
oldPath.delete();
}
}
标签:
原文地址:http://www.cnblogs.com/Onexway/p/5946458.html