【发布时间】:2019-05-24 00:44:22
【问题描述】:
我尝试使用 react-native-fs readFile 函数从文本文件中读取,结果字符串总是以某些字符结尾。
我已经更改了文本文件的内容,它仍然在 4094 个字符后结束。
await RNFS.readFile(p, 'utf8')
.then((readresult) => {
console.log(readresult);
res = {success: true, contents: readresult};
})
.catch((err) => {
console.log('ERROR' + err.message);
res = {success: false, errorMsg: err.message};
})
日志总是产生前 4094 个字符。
【问题讨论】:
标签: react-native readfile react-native-fs