[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua, testing whether a file exists...
- From: The Doctor <the_doctor@...>
- Date: Wed, 1 Sep 2004 15:03:52 +0100
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.