more io methods

This commit is contained in:
Evil Factory
2022-05-19 16:23:12 -03:00
parent 4078fe024b
commit c9e13ad412
@@ -126,6 +126,22 @@ namespace Barotrauma
File.WriteAllText(path, text);
}
public static void Delete(string path)
{
if (!IsPathAllowedException(path))
return;
File.Delete(path);
}
public static void DeleteDirectory(string path)
{
if (!IsPathAllowedException(path))
return;
Directory.Delete(path, true);
}
public static FileStream OpenRead(string path)
{
if (!IsPathAllowedException(path))