Get file list in resource directory

I tried to use system.pathForFile(nil, system.ResourceDirectory) with lfs to get a list of files in resource directory. It works on iOS. I recently need to support Android platform and I found that it doesn’t work on Android.

See question 2 on http://www.coronalabs.com/blog/2012/05/16/faq-wednesday-5/

Is there any method for me to get a list of files in resource directory on Android without hardcoding the file list?

I’m looking for the same functionality, how did you solve this problem ? Did you end up hardcoding a file list ?

According to the corona docs, “On Android devices, there is no literal system.ResourceDirectory because all resource files reside inside a compressed APK file”. I hardcoded my file list. You can put your file list in a text file or database for easier to maintain. Or you could try the zip plugin to compress everything in a zip file and unzip them into temporary directory which you can read the file list and it is the same as how corona read resource files on android. 

See the file docs at http://docs.coronalabs.com/daily/guide/data/readWriteFiles/index.html

and the zip plugin https://www.coronalabs.com/blog/2013/05/21/tutorial-using-zip-plugin/

I’m looking for the same functionality, how did you solve this problem ? Did you end up hardcoding a file list ?

According to the corona docs, “On Android devices, there is no literal system.ResourceDirectory because all resource files reside inside a compressed APK file”. I hardcoded my file list. You can put your file list in a text file or database for easier to maintain. Or you could try the zip plugin to compress everything in a zip file and unzip them into temporary directory which you can read the file list and it is the same as how corona read resource files on android. 

See the file docs at http://docs.coronalabs.com/daily/guide/data/readWriteFiles/index.html

and the zip plugin https://www.coronalabs.com/blog/2013/05/21/tutorial-using-zip-plugin/