开发者

List files and sub directories Android

What i want to do is to open a directory through android application and list all the files as well as directories present in that directory. I would also like to retrieve permissions and owner information of each file/directory. This can be achieved in ja开发者_如何转开发va but how can i do the same in Android?


The java.io package has been reimplemented within Android. You should be able to use the same mechanisms in Android as you do in Java.

File f = new File("/your/file/path");
File[] files = f.listFiles();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜