【发布时间】:2020-03-01 13:11:12
【问题描述】:
我正在使用一个 react-native 项目,我想将 android 内资产中某个文件夹的内容复制到 RNFS.DocumentDirectoryPath。如何执行此操作?
我使用了属性 copyFileAssets()。
copyfile() {
RNFS.copyFileAssets('/ICF-Package', RNFS.DocumentDirectoryPath + '/ICFPackage').then((result) => console.log('DONE')).catch((error) => console.log(error, 'ERROR'));
};
I'm getting the following error:
错误:无法打开资产“/ICF-Package”
【问题讨论】:
标签: android react-native react-native-fs document-directory