lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Please can someone tell me if Lua can tell if a file exists?
I've tried testing for for a valid return from io.open(), but if the file doesn't exist, Lua throws up a default error, never mind trying to run my own handling code...
The only fuction that I can find that even looks like it might help is io.type(), and that gets a nil even if the file does exist.

While I can easily check for empty files, checking for absent ones has failed to allow me any control at all so far.