file io
This commit is contained in:
@@ -6,6 +6,7 @@ using Microsoft.Xna.Framework;
|
||||
using Barotrauma.Networking;
|
||||
using System.Threading.Tasks;
|
||||
using Barotrauma.Items.Components;
|
||||
using System.IO;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -397,6 +398,26 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
private class LuaFile
|
||||
{
|
||||
// TODO: SANDBOXING
|
||||
|
||||
public static string Read(string path)
|
||||
{
|
||||
return File.ReadAllText(path);
|
||||
}
|
||||
|
||||
public static void Write(string path, string text)
|
||||
{
|
||||
File.WriteAllText(path, text);
|
||||
}
|
||||
|
||||
public static bool Exists(string path)
|
||||
{
|
||||
return File.Exists(path);
|
||||
}
|
||||
}
|
||||
|
||||
// hooks:
|
||||
// chatMessage
|
||||
// think
|
||||
|
||||
Reference in New Issue
Block a user