Hi all,
I am trying to create a little widget that allows the user to cycle through different options, each represented by an image. To do this, I need to use lfs to search a given directory for images to cycle through. Here is the code I am using to do this:
for file in lfs.dir (path_for_elements) do
if (file ~= “.”) and (file ~= “…”) then
t[i] = path_for_elements…file
i = i + 1
end
end
This works in the simulator, but not on an Android build. I am assuming that this is because the file structure is compiled into binary and can’t be traversed with the lfs library.
Right now, I am working around this by mirroring the structure of my images directory with a table.