react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

copyFile - "there is no such file"

Open hugomostar opened this issue 7 years ago • 1 comments

I have files in assets folder which is created in Xcode under project name folder.

I can access file in my template with:

source={{uri: './assets/myfolder/index.html'}}

but I can't copy this file to DocumentsDirectory with:

RNFS.copyFile('./assets/myfolder/index.html', RNFS.DocumentDirectoryPath + '/index.html').then((result) => console.log('DONE')).catch((error) => console.log(error, 'ERROR'));

Error: The file “index.html” couldn’t be opened because there is no such file.

On android copyFileAssets works fine.

hugomostar avatar Nov 06 '18 10:11 hugomostar

same error here can't be able to copyfile in ios, did you got any solution?

hareesh7777 avatar Oct 11 '23 04:10 hareesh7777