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();
精彩评论