diff --git a/tools/ScriptTool/Asset.cs b/tools/ScriptTool/Asset.cs index 630aaba..b4562ed 100644 --- a/tools/ScriptTool/Asset.cs +++ b/tools/ScriptTool/Asset.cs @@ -5,7 +5,7 @@ using System.IO; namespace ScriptTool { - internal static class Asset + public static class Asset { public static readonly string AssetPath; @@ -14,7 +14,7 @@ namespace ScriptTool AssetPath = AppDomain.CurrentDomain.BaseDirectory; } - private static string GetFullPath(string path) + public static string GetFullPath(string path) => Path.Combine(AssetPath, path); public static string ReadAllText(string path) @@ -22,5 +22,11 @@ namespace ScriptTool public static byte[] ReadAllBytes(string path) => File.ReadAllBytes(GetFullPath(path)); + + public static string[] ReadAllLines(string path) + => File.ReadAllLines(GetFullPath(path)); + + public static void WriteAllText(string path, string text) + => File.WriteAllText(GetFullPath(path), text); } }