Update logic code
优化补丁清单格式为二进制。
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user