Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
file exists — Gideros Forum

file exists

GregBUGGregBUG Guru
edited April 2012 in General questions
is there a better way for check if a file exists in lua ? :-B
--------------------------
-- 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
thanks.

Likes: chipster123

TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
www.tntengine.com
+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.