Lua's method for determining whether a file exists

 Lua's method for determining whether a file exists

function isFileExists(filePath)
	local fp = io.open(filePath, "rb")
	if fp then
		fp:close()
	end
	return fp ~= nil
end

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example