获取特定目录的内容在SD卡 [英] Getting the Contents of a Specific Directory on the SDCard

查看:149
本文介绍了获取特定目录的内容在SD卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么会去上的SD卡让所有的文件数组中的一个特定的目录,例如/铃声/?

How would I go about getting an array of all the files in a specific directory on the sdcard, i.e. /ringtones/?

推荐答案

这很简单。只要做到以下几点:

It's very simple. Just do the following:

File dir = new File(path);
String[] files = dir.list();

这篇关于获取特定目录的内容在SD卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆