itinance / itinance/react-native-fs

[iOS] Error: ENOENT: no such file or directory.

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

Description

I am working on iOS. I want to read text from text file. My text file is stored into the app folder
My App folder structure :
```
-src
-data
sample.txt
sample.png
```
I want to access sample.text.

```
var RNFS = require("react-native-fs");
readFile() {
let path = RNFS.---- + -----
RNFS.readFile( path, "utf8")
.then(data => {
console.log("Data :-", data);
})
.catch(error => {
console.log("Error :-", error);
});
}
```

I tried from [here](https://github.com/itinance/react-native-fs/#API), but not able to create sample.txt path.

So please help me to create absolute path of sample.text. ( **let path = RNFS.---- + -----**)

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.