zoukankan      html  css  js  c++  java
  • 代码方式删除SVN

    public static void delect(File s) {
            File b[] = null;
            if (s.exists()) {// 判读是否存在
                if (s.isDirectory()) {// 判断是不是目录
                    b = s.listFiles();
                    if (b != null) {
                        for (int i = 0; i < b.length; i++) {
                            if (b[i].isFile()) { // 判断是不是目录
                                b[i].delete();// 删除子文件
                            } else {
                                delect(b[i]);// 递归
                                b[i].delete();
                            }// 删除子目录
                            System.out.println(b[i].getPath());
                        }
                    }
                } else {
                    s.delete();
                }
                s.delete();
            }
        }
    
    public static void removeFile(File f3) {// 查看目录下的所有文件
            if (f3.exists()) {
                if (f3.isDirectory()) {
                    File[] f = f3.listFiles();// 查看目录的文件
                    for (int i = 0; i < f.length; i++) {
                        removeFile(f[i]);
                        if (f[i].getName().equals(".svn")||f[i].getName().endsWith(".class")) {
                            delect(f[i]);
                        }
                    }
                }
                // else {System.out.println(f3);};
            }
        }
    
        @Test
        public void testsearchFiledLoc() throws IOException{
            removeFile(new File("F:\test"));
  • 相关阅读:
    ffmpeg之AVFrame
    ffmpeg之samplefmt
    音视频基本概念
    cmake函数 file
    ffmpeg之AVPacket
    ffmpeg之AVFormatContext
    存储格式:packed和planar
    ffmpeg之channel_layout
    cmake函数: get_filename_component
    ffmpeg整体结构
  • 原文地址:https://www.cnblogs.com/ak23173969/p/4979932.html
Copyright © 2011-2022 走看看