fix:1、修改命名空间和文件夹名字

This commit is contained in:
2026-04-27 11:20:13 +08:00
parent db90a6e485
commit 70d45d4705
4252 changed files with 465 additions and 463 deletions
@@ -0,0 +1,40 @@
using System.IO;
using System.Text;
using UnityEngine;
namespace RedHotRoast.Editor
{
public static class FileKit
{
public static void CreateTxt(string path, string Txt, bool IsCover = false, bool IsAssetPath = false)
{
if (IsAssetPath)
{
path = Application.dataPath.Replace("Assets", string.Empty) + path;
}
if (!Directory.Exists(GetFullDiretoryPath(path)))
{
Directory.CreateDirectory(GetFullDiretoryPath(path));
}
if (File.Exists(path))
{
if (!IsCover)
{
return;
}
File.Delete(path);
}
File.WriteAllText(path, Txt, new UTF8Encoding(false));
}
public static string GetFullDiretoryPath(string filePath)
{
string fileName = Path.GetFileName(filePath);
return filePath.Replace(fileName, string.Empty);
}
}
}