Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28463

In a react-native android project,How to copy a folder from assets to the DocumentDirectoryPath?

$
0
0

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


Viewing all articles
Browse latest Browse all 28463

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>