fix: 1、更换命名空间和文件夹名字

This commit is contained in:
2026-06-02 11:11:47 +08:00
parent dfead2c461
commit 2a53f34659
4305 changed files with 582 additions and 603 deletions
+40
View File
@@ -0,0 +1,40 @@
using System.IO;
using System.Text;
using UnityEngine;
namespace ZooMatch.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);
}
}
}