Hi, I have a problem with lfs. I need “parse” some path and return the array of titles of files.
I use this code:
Spath = system.pathForFile("images/sockets/sockets/") for file in lfs.dir(Spath) do if file ~= "." and file ~= ".." then table.insert(socketArray, file) end end
socketArray returns something like:
a1.png
a2.png
a3.png
and so on…
And this works perfectly fine on emulator. However, on actual Android device it thows me an error, that there is no such directory:
Sure there are no such directory, because this is a path for emulator, but why it is not working properly, I dont know
But just simple Corona function somehow sees that directory rightly and works perfectly.
play\_b = widget.newButton( { x = display.contentCenterX, y = display.contentHeight/10\*5, id = "play\_b", onEvent = handleButtonEvent, defaultFile = "images/ui/play\_button/play\_button.png", overFile = "images/ui/play\_button/play\_button\_pressed.png" } )
Code above works fine, and uses big-button png, nevermind that it is stored inside of apk.