Environment.getExternalStorageDirectory将给您
File对应的SDCARD。然后,您只需要使用
File方法。
那应该是这样的:
File sdCardRoot = Environment.getExternalStorageDirectory();File yourDir = new File(sdCardRoot, "yourpath");for (File f : yourDir.listFiles()) { if (f.isFile()) String name = f.getName(); // make something with the name}注意事项:来自KitKat及以上版本,需要获得
READ_EXTERNAL_STORAGE许可。



