const fs = wx.getFileSystemManager();
const fd = fs.openSync({
filePath: `${wx.env.USER_DATA_PATH}/hello.txt`,
flag: 'r'
});
const tempBuffer = new ArrayBuffer(1024)
var readResult = fs.readSync({
arrayBuffer: tempBuffer,
fd: fd,
length: 1024,
offset: 0,
position: 0
});
以上代码在ios高性能模式下报错:
readSync: fail array buffer does not exist?