Beispiel #1
0
    /// <summary>
    /// 从文件中读取文本数据
    /// </summary>
    /// <param name="path">相对路径</param>
    /// <returns></returns>
    public static string ReadTextFromFile(string path)
    {
        string content  = "";
        string fullPath = FileUtil.getFilePath(path);

        try
        {
            content = File.ReadAllText(fullPath);
        } catch
        {
            SampleDebuger.LogRed(" 没有找到文件 " + fullPath);
        }
        return(content);
    }