Created
December 10, 2022 14:14
-
-
Save Tunied/6250c1800f198b287bc4ae04d37995e7 to your computer and use it in GitHub Desktop.
Load给定后缀的所有文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rootPath = EMG_FileUtils.PersistentDataPath + $"/{ProjectName}/Script"; | |
if (!Directory.Exists(rootPath)) | |
{ | |
Directory.CreateDirectory(rootPath); | |
} | |
var allFilePath = Directory.GetFiles(rootPath, "*.lua"); | |
foreach (var filePath in allFilePath) | |
{ | |
var info = new FileInfo(filePath); | |
var fileStr = File.ReadAllText(filePath); | |
CELog.Log($"加载文件 {info.Name} "); | |
CELog.Log(fileStr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment