itinance / itinance/react-native-fs

copyFile - "there is no such file"

Open
#580 1 comment 9 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.