使用FileSystemManager.statSync来读取本地路径的目录时,recursive为false,可以正常读取,为true时,会报错fail permission denied
模拟器上正常,安卓手机上报错。读取的路径不是wxUserData,是自己的代码目录
框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|
小游戏 | Bug | FileSystemManager.statSync | 微信安卓客户端 | 7.0.16 | 2.11.3 |
模拟器上正常,安卓手机上报错。读取的路径不是wxUserData,是自己的代码目录
Framework type problem type API / component name terminal type wechat version basic library version games bug FileSystemManager.statSync Use of wechat Android client 7.0.16 2.11.3 FileSystemManager.statSync To read the directory of the local path, recursive is false and can be read normally. If it is true, an error of fail permission denied will be reported The simulator is normal. Android phone reports an error. The read path is not wxuserdata, but its own code directory
回答:
本地路径,而不是代码包路径。小游戏有以下路径,代码包绝对路径、本地临时路径、本地路径和本地缓存路径