|
Jerome Vuarand wrote:
If you have access to LuaFileSystem [1] you can also use: function file_exist(file_name) return lfs.attributes(file_name, 'mode')~=nil end This may or may not be faster depending on your setup.
I use lfs.attributes(file_name, 'size') ~= nilI wonder which one will be faster, assuming there is a difference? (just laziness on my part... I should measure them, but taking into account OS caching is not always trivial)
I guess it's an idle question anyway :-) Enrico