I tried using both .Net and Java:
private void Test(String folderName)
{
System.IO.DirectoryInfo dirN = new
System.IO.DirectoryInfo(folderName);
System.IO.FileInfo[] filesN;
Java.IO.File dirJ = new Java.IO.File(folderName);
Java.IO.File[] filesJ;
filesN = dirN.GetFiles();
filesJ = dirJ.ListFiles();
}
Very strange. For an internal directory '/data/data/com.my.app/databases/'
all works well with .Net or Java, with or without a trailing '/'.
But, for an external directory, like
'/mnt/sdcard/Android/data/com.my.app/files/posters/', if I have a trailing
'/', both Java and .Net return a zero length list of files.
If I remove the trailing '/', .Net still returns a zero length list of
files, the the Java dirJ.ListFiles() works properly!
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/System-IO-DirectoryInfo-EnumerateFiles-not-working-on-external-directory-tp5060004p5060065.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid