mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Add mcl_util.file_exists() function
This commit is contained in:
parent
57b5d13edf
commit
f47674b9a7
1 changed files with 9 additions and 0 deletions
|
@ -22,6 +22,15 @@ function table.update_nil(t, ...)
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mcl_util.file_exists(name)
|
||||||
|
local f = io.open(name)
|
||||||
|
if not f then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
f:close()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
-- Based on minetest.rotate_and_place
|
-- Based on minetest.rotate_and_place
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
Loading…
Reference in a new issue