Created
February 20, 2023 05:27
-
-
Save RomikMakavana/23d71e4ca8a57dab4f398a124baaeb9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RNFS from 'react-native-fs'; | |
const filePath = RNFS.DocumentDirectoryPath + '/example.txt'; | |
RNFS.exists(filePath) | |
.then((exists) => { | |
if (exists) { | |
console.log('File exists'); | |
} else { | |
console.log('File does not exist'); | |
} | |
}) | |
.catch((error) => { | |
console.log(error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment