Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28469

react-native-fs.the actual document directory path in android

$
0
0

I tried the code for creating a file, and i created two files, and that is

    // require the module
    var RNFS = require('react-native-fs');

    // create a path you want to write to
    var path = RNFS.DocumentDirectoryPath + '/test.txt';

    // write the file
    RNFS.writeFile(path, 'Lorem ipsum dolor sit amet', 'utf8')
    .then((success) => {
    console.log('FILE WRITTEN!');
    })
    .catch((err) => {
    console.log(err.message);
    });

i created two files with that code. but i cant see the actual created files. Where exactly it was saved?


Viewing all articles
Browse latest Browse all 28469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>