android递归查找文件
来源:互联网 发布:天龙装备评分知多少 编辑:程序博客网 时间:2024/05/16 23:51
/** * 在指定根目录下递归查找文件maskrom.bin * path 查找根路径 **/public static void findFilePath4(String path){ try { File a = new File(path); String[] file = a.list(); File temp = null; String path2; String paths = new String(); for(int i = 0; i < file.length; i++){ if(path.endsWith(File.separator)){ path2 = path + file[i]; }else{ path2 = path + File.separator + file[i]; } temp = new File(path2); String name = (temp.getName()).toString(); if( name.equals(".") || name.equals("..") || name.equalsIgnoreCase("Android") || name.equalsIgnoreCase("LOST.DIR") || name.equalsIgnoreCase("UCDownloads") || name.equalsIgnoreCase("Tencent") || name.equalsIgnoreCase("system") || name.equalsIgnoreCase("wandoujia") || name.equalsIgnoreCase("DCIM") || name.equalsIgnoreCase("media") || name.equalsIgnoreCase("music") || name.equalsIgnoreCase("movies") || name.equalsIgnoreCase("wangxin") || name.equalsIgnoreCase("tencentmapsdk") || name.equalsIgnoreCase("taobao") || name.equalsIgnoreCase("qqmusic") || name.equalsIgnoreCase("alipay") || name.startsWith(".") || name.startsWith("com.")){ continue; } if(temp.isFile()){ if(name.equals("maskrom.bin")){ break; } } if(temp.isDirectory()){ findFilePath4(path2); } } } catch (Exception e) { // TODO: handle exception }}
0 0
- android递归查找文件
- 递归查找文件 -------陈开源
- 递归查找文件
- 递归思想查找文件
- 递归文件查找
- 递归遍历文件夹查找文件
- Linux 文件、内容查找(递归) ,grep ,find
- c++ 递归查找指定类型的文件。
- 递归查找文件的Win32代码
- Linux 文件、内容查找(递归) ,grep ,find
- 递归查找一文件夹下的文件。
- Linux 文件、内容查找(递归) ,grep ,find
- Linux 文件、内容查找(递归) ,grep ,find
- HPUX如何在递归查找文件内容
- 文件中递归循环查找指定格式文件
- 递归法遍历目录查找文件
- 递归方式查找文件夹的所有文件
- Linux 文件、内容查找(递归) ,grep ,find
- Struts2教程6:在Action类中获得HttpServletResponse对象的四种方法
- QTP总结
- Linux Skype 4.3 下载地址
- [转载]AngularJs学习笔记--directive
- window.dialogArguments
- android递归查找文件
- JAVA窗体中嵌入cmd窗口
- Activiti环境配置、项目搭建、与Spring集成、简单示例
- Codeforces Round #253 (Div. 1) B. Andrey and Problem
- 矩阵快速幂uva10870
- 【Python】Python27在Win7 64bit系统下的安装
- 土地利用对生态系统结构的影响
- Military Discount Oakley Sunglasses Frame Ash/Gold
- MyEclipse设置编码方式