diff --git a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaClasses.cs b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaClasses.cs index e38575ead..6d13ffca1 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaClasses.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaClasses.cs @@ -652,6 +652,16 @@ namespace Barotrauma return File.Exists(path); } + public static bool CreateDirectory(string path) + { + if (!IsPathAllowedLuaException(path)) + return false; + + Directory.CreateDirectory(path); + + return true; + } + public static bool DirectoryExists(string path) { if (!IsPathAllowedLuaException(path))