收藏
回答

readSync在ios高性能模式下报错:array buffer does not exist?

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?

回答关注问题邀请回答
收藏
登录 后发表内容