It looks like you're new here. If you want to get involved, click one of these buttons!
-------------------------- -- check if file exists -- -------------------------- local function fileExists(fileName) local file = io.open(fileName) if file ~= nil then io.close(file) end return file == nil end |
Likes: chipster123
Comments
I don't know a better way then yours. On the other hand LuaFileSystem plugin http://keplerproject.github.com/luafilesystem/ is on the roadmap http://bugs.giderosmobile.com/issues/58
www.tntengine.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
thanks for the tips. i did't know the existence of the function "pcall"
thanks.
Gianluca.
www.tntengine.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps