Saturday, August 24, 2013

View All Files in a Directory on Android

I was having a terrible time trying to figure out how to list all the files in a folder on Android. I know how to easily do it in C#, but java-Android is making life difficult. Finally I figured it out. The seemingly trivial was made difficult by vague exception messages.

The key is that the file you run listfile() on must be a directory. This was not clear from all the examples I found on other websites.

No comments:

Post a Comment