Hi,
it is possible to read single files from the resourceDirectory according to this: http://docs.coronalabs.com/api/library/system/ResourceDirectory.html
so why isn’t it possible to read the contents of a directory in the resourceDirectory?
WORKS
=======
local path = system.pathForFile(“myFolder/myFile.json”, system.ResourceDirectory)
local file = io.open(path, “r”)
DOES NOT WORK
===============
local path = system.pathForFile(“myFolder”, system.ResourceDirectory)
local files = lfs.chdir(path) – This throws an exception.
As an example, this bug prevents a game from loading up for instance a bunch of json levels from a directory. And that is exactly what we need to do in our game right now.
I’m not the only one with this problem, check the end of the comments here: http://www.coronalabs.com/blog/2012/05/08/luafilesystem-lfs-tutorial/