minetest_wadsprint/lib_file_exists.lua

4 lines
130 B
Lua

function file_exists(name)
local fd = io.open(name,"r")
if fd ~= nil then io.close(fd) return true else return false end
end