When executing code
File path = new File("/data");
boolean isDir = path.isDirectory();
//isDir is true
String[] fList = path.list();
//fList == null!
on Android 2.3 emulator, the list of files is NULL. This seems to contradict the statement from the documentation http://developer.android.com/reference/java/io/File.html#list ():
Returns null if this file is not a directory.
What is wrong here?
source
share