title: Accessing file in public folder through capacitor
body: <p>I'm using ionic-v5, capactior and react to build an app.</p>
  <p>I have a file (<code>data.json</code>) stored inside of my <code>public/</code> folder.</p>
  <p>I simply want to be able to load that file in and store it as an object.</p>
  <p>So far I have tried:</p>
  <pre class="lang-js prettyprint-override"><code>import { Filesystem, FilesystemEncoding } from '@capacitor/core'
  
  let contents = await Filesystem.readFile({
      path: &quot;data.json&quot;,
      encoding: FilesystemEncoding.UTF8,
  })
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>import { HTTP } from '@ionic-native/http';
  
  let response = await HTTP.get(&quot;file://data.json&quot;, {}, {});
  ret = response.data;
  
  return ret;
  </code></pre>
  <p>I have also looked at <a href="https://ionicframework.com/docs/native/file" rel="nofollow noreferrer">https://ionicframework.com/docs/native/file</a> but the documentation is poor to say the least.</p>
  <p>Along with this I have tried pre-pending <code>/android_asset/public</code> to all of the paths but no luck (I know it would only work on Android, I just wanted to get something).</p>