title: How to save image to Document Directory from local file in react native?
body: <p>I am new to react native, I want to save an image from local folder(like Module/assets/ImageName.png) in my project into Document Directory. I am using the 'react-native-fs' library for the same.</p>
  
  <p>Code is below: </p>
  
  <pre><code>componentWillMount() {
      var RNFS = require('react-native-fs');
      var path = RNFS.DocumentDirectoryPath + '/ImageName.png';
      // write the file
      RNFS.writeFile(path, './Module/assets/ImageName.png', 'utf8') // what to use inplace of utf8?
        .then((success) =&gt; {
          console.log(path);
        })
        .catch((err) =&gt; {
          console.log(err.message);
        });
      }
  </code></pre>
  
  <p>Please suggest how should I proceed?
  Thanks.</p>