filesystems - Loop through all the files in a directory with Corona and Lua -


is possible in corona sdk list of files in directory? have variable resourcedir = system.resourcedirectory, how loop through files in resourcedir?

this functionality has been added corona including luafilesystem module:

local lfs = require "lfs"  local doc_path = system.pathforfile( "", system.documentsdirectory )  file in lfs.dir(doc_path)     -- file current file or directory name     print( "found file: " .. file ) end 

more info: http://blog.anscamobile.com/2012/05/luafilesystem-lfs-tutorial/


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -