想要拷貝一份項目代碼到家裡
package delete
import java
public class DeleteFile {
//要刪除的文件夾
static String delFileStr =
public static void main(String args[]){
File file = new File(
File [] files = file
findFile(files)
}
private static void findFile(File [] files){
for(File file : files){
if(file
String name = file
if(ntains(name)){
//對
deleteFile(file
//刪除
file
}else{
findFile(file
}
}
}
}
private static void deleteFile(File [] files){
for(File file: files){
if(file
file
}else if(file
deleteFile(file
file
}
}
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26515.html