// 在本地用户文件目录下创建一个文件 hello.txt,写入内容 "hello, world"
const fs = wx.getFileSystemManager()
fs.writeFileSync(`${wx.env.USER_DATA_PATH}/hello.txt`, 'hello, world', 'utf8')
// 写入图片
fsm.writeFile({
filePath:`${wx.env.USER_DATA_PATH}/a.jpg`,
data: buffer,
encoding: 'binary',
success() {
// resolve(filePath);
wx.getImageInfo({
src: `${wx.env.USER_DATA_PATH}/a.jpg`,
success: function (res) {
console.log(res)
resolve(res);
},
})