package com.bohuikeji.delivery.backstage.controller.test;

import java.io.File;

public class MainTest {
    public static void main(String... s) {
        String path = "D:\\open\\datax";
        File file = new File(path);
        func(file);

    }

    private static void func(File file){
        File[] fs = file.listFiles();
        for(File f:fs){
            if(f.isDirectory()) {
                func(f);
            }
            if(f.isFile()){
                if (f.getName().contains("._")){
                    System.out.println("删除文件："+f.getName());
                    f.deleteOnExit();continue;
                }
                System.out.println(f.getName());
            }

        }
    }
}
