80,337
社区成员
发帖
与我相关
我的任务
分享
private boolean scanPicture(String path ){
File tmp = new File(Path);
String name = tmp.getName();
BaseData file = new BaseData();
file.setPath(tmp.getAbsolutePath());
file.setParentPath(tmp.getParent());
file.setName(name);
if (tmp.isDirectory()) {
tmp.setType(Constants.FILE_TYPE_DIR);
File[] fs = tmp.listFiles();
if (fs!=null) {
for(File f:fs){
if(scanPicture(f.getAbsolutePath())==true)
hasPictureFiles.add(tmp);
}
}
} else {
if (check(name, resource.getStringArray(R.array.photo_filter)))
return true;
}
return false;
}