import RNFS from 'react-native-fs';
var path = RNFS.DocumentDirectoryPath + '/test.txt';
RNFS.writeFile(path, 'Lorem ipsum dolor sit amet', 'utf8')
.then(success => {
console.log('FILE WRITTEN!');
})
.catch(err => {
console.log(err.message);
});
console.log(RNFS.DocumentDirectoryPath)
// /data/data/xxx.xxx.xxx/files/
But I didn't find a path/file like /data/xxx.xxx.xxx/files/ in the data directory of the mobile phone
But the entry in the code exists
RNFS.readDir(RNFS.DocumentDirectoryPath).then(result => {
console.log('DocumentDirectoryPath GOT RESULT', result);
});
I want to know what is the path of RNFS.DocumentDirectoryPath in the phone?