获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
q q q
使用WX.env.USER_DATA_PATH的创建文件失败?使用该环境变量去创建文件失败,提示:The file did not exist and failed to be created, msg=path must be a string。 输出打印的地址是:文件路径是:http://usr/player_data.txt this._filePath = string.Format("{0}/{1}.txt", WX.env.USER_DATA_PATH, "player_data"); Error($"文件路径是:{this._filePath}"); if (_fs.AccessSync(this._filePath) != "ok") { var result = _fs.WriteFileSync(this._filePath, defaultBytes); if (result != "ok") { Error($"The file did not exist and failed to be created, msg={result}"); } }
2022-12-06