2

I am using a react-native project in which,I want to copy the contents of a certain folder in assets inside android to RNFS.DocumentDirectoryPath. How can this be performed?

I have used the attribute 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:

Error: Asset '/ICF-Package' could not be opened

0 Answers0