itinance / itinance/react-native-fs
Cannot use copyFileAssets to copy file from android assets folder
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
RN: 0.43.3
RNFS: 2.5.1
I am trying to copy file from android assets folder into android document directory path.
1. I test the file's existence using `RNFS.existsAssets('stickers/test.txt').then((result) => console.log(result));`. The result is `true`
2. I copy the textfile into DocumentDirectoryPath using `RNFS.copyFileAssets('stickers/test.txt', RNFS.DocumentDirectoryPath)
.then((result) => console.log(result))
.catch((error) => console.log(error));`. It shows
> { [Error: ENOENT: no such file or directory, open 'stickers/test.txt'] framesToPop: 1, code: 'ENOENT' }
Expected behavior: Since existsAssets returned TRUE, the file should be copied successfully into new directory instead of returning file not found
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.