title: How to read a text file that was downloaded locally (Ionic 2 and Cordova)
body: <p>I've downloaded a file from my webserver using the following code:</p>
  
  <pre><code>download = () : void =&gt; {
    this.platform.ready().then(() =&gt; {
    let pathToSaveTo = "";
  
    let filename = this.url.substring(this.url.lastIndexOf('/') + 1);
  
    if (this.platform.is('android')) {
        pathToSaveTo = cordova.file.dataDirectory + filename;
    }
    else if(this.platform.is('ios')) {
        pathToSaveTo = cordova.file.dataDirectory + filename;
    }
  
    let ft = new Transfer();
  
    ft.download(this.url, pathToSaveTo).then(() =&gt; {
        this.savedTo = pathToSaveTo;
    });
  })
  </code></pre>
  
  <p>I'm having a lot of trouble finding out a way to open the .txt file and read the text inside. I've looked for quite a while, and it seems like using Ionic native would be the best, but how exactly would I go about that? If someone could provide an example I would really appreciate it. </p>
  
  <p>If anybody has any specific questions about what I'm trying to achieve I'll make edits.</p>
  
  <p>Thanks!</p>