add file exists checking in my_uuid

This commit is contained in:
2023-11-12 02:25:29 +08:00
parent 0b4cc166e0
commit b4835ef305
5 changed files with 28 additions and 77 deletions
+13
View File
@@ -0,0 +1,13 @@
local _M = {}
function _M.file_exists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
return _M