I have a problem with lfs (lua file system).
I’m trying to display all files that reside in DocumentsDirectory in a tableView. But the for-loop doesn’t produce any output, although I have files in there (for example, settings.json) (the tableView functions are commented, as they are not problematic).
I’m using build 2076 and Win8.
Code which I use is the following:
local doc_path = system.pathForFile( “”, system.DocumentsDirectory )
print (doc_path)
--tableView:insertRow(options)
for ifile in require(“lfs”).dir(doc_path) do
print ("Found file " … ifile)
--options.id = ifile
--tableView:insertRow(options)
end
Thanks in advance for any tips