diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 9f68434aca..58285039af 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -22,6 +22,15 @@ function table.update_nil(t, ...) return t 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 --[[