itinance / itinance/react-native-fs
RNFS.exists() returning false everytime
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
When using the exists() function, false is returned everytime, even when the file 100% exists. The file is stored in /app/assets.
import React, {Component} from 'react'
import {View,Text,Image,Button} from 'react-native'
import styles from "./styles"
import { Provider as PaperProvider } from 'react-native-paper';
import RNFS from 'react-native-fs';
class CharacterSelect extends Component{
static navigationOptions = {
header: null
}
constructor() {
super()
this.state = {
displayView:null
}
}
async funcy() {
RNFS.exists("@assets/character.json")
.then((exists) => {
if (exists) {
console.warn("BLAH EXISTS");
} else {
this.setState({
displayView:(Oopsie, no character!this.checkCharacterExists()}>)
})
}
});
}
render() {
this.funcy()
const {} = styles
return(
Welcome to RpgDoIt!
{this.state.displayView}
)
}
}
export default CharacterSelect
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.