80,351
社区成员
发帖
与我相关
我的任务
分享
/**
* 得到指定文夹中所有图片的路径
**/
private String[] ListFile() {
File file = new File(Environment.getExternalStorageDirectory()
+ "/DCIM/Camera/");
File[] f = file.listFiles();
int count = f.length;
String[] Path = new String[f.length];
for (int i = 0; i < f.length; i++) {
Path[i] = f[i].getPath();
}
String[] inverted_orderPath = new String[f.length];// 倒序路径
for (int i = 0; i < f.length; i++) {// 倒序排列
inverted_orderPath[i] = Path[--count];
}
return inverted_orderPath;
}