more io methods
This commit is contained in:
@@ -126,6 +126,22 @@ namespace Barotrauma
|
|||||||
File.WriteAllText(path, text);
|
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)
|
public static FileStream OpenRead(string path)
|
||||||
{
|
{
|
||||||
if (!IsPathAllowedException(path))
|
if (!IsPathAllowedException(path))
|
||||||
|
|||||||
Reference in New Issue
Block a user