how to access the files in a directory
hi i am new to and开发者_运维百科roid programming, can someone please tell me how to get access to the files in a directory , i am using Environment.getExternalStorageDirectory() method?
That method just returns a java.io.File, so you should be able to get the files using the standard Java methods:
String[] list(); //Returns an array of strings with the file names in the directory represented by this file. String[] list(FilenameFilter filter); //Gets a list of the files in the directory represented by this file. File[] listFiles(FileFilter filter); //Gets a list of the files in the directory represented by this file.
( http://developer.android.com/reference/java/io/File.html )
精彩评论