Update logic code

优化补丁清单格式为二进制。
This commit is contained in:
hevinci
2022-12-03 18:48:51 +08:00
parent 7aab610be5
commit 19cb239746
14 changed files with 193 additions and 62 deletions
+12 -2
View File
@@ -117,15 +117,25 @@ namespace YooAsset
internal static class FileUtility
{
/// <summary>
/// 读取文件
/// 读取文件的文本数据
/// </summary>
public static string ReadFile(string filePath)
public static string ReadAllText(string filePath)
{
if (File.Exists(filePath) == false)
return string.Empty;
return File.ReadAllText(filePath, Encoding.UTF8);
}
/// <summary>
/// 读取文件的字节数据
/// </summary>
public static byte[] ReadAllBytes(string filePath)
{
if (File.Exists(filePath) == false)
return null;
return File.ReadAllBytes(filePath);
}
/// <summary>
/// 创建文件(如果已经存在则删除旧文件)
/// </summary>