I have json file in my bundle. I want to copy file to document directory.
var path = RNFS.DocumentDirectoryPath +'/data.json'; RNFS.copyFile(`${RNFS.MainBundlePath}/assests/resource/data.json`, path) .then(() => { console.log('FILE COPIED'); }) .catch((err) => { console.log(err.message); });The file “data.json” couldn’t be opened because there is no such file.