# How can i access the app's assets folder using fileSystem capacitor

**URL:** <https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085>\
**Category:** Capacitor\
**Created:** [June 11, 2020, 8:22pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085 "2020-06-11T20:22:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ab-iym](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@ab-iym](https://forum.ionicframework.com/u/ab-iym)\
**Post date:** [June 11, 2020, 8:22pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/1 "2020-06-11T20:22:37Z")

</div>

How can i access the assets folder using the built in filesystem capacitor plugin in Ionic 5. I have followed all the [filesystem capacitor documentation](https://capacitor.ionicframework.com/docs/apis/filesystem/#type-432) but nothing seems to do the job. I want to avoid cordova plugins as much as possible.

I have tried setting the path to file:///android\_asset/www/assets but failed.

Also tried this:  
try {  
let ret = await Filesystem.readdir({  
path: “”,  
directory: FilesystemDirectory.External  
});  
console.log("Directory: " + ret);  
} catch(e) {  
console.error(‘Unable to read dir’, e);  
}

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [June 11, 2020, 9:35pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/2 "2020-06-11T21:35:47Z")

</div>

> [@ab-iym](#):
>
> How can i access the assets folder using the built in filesystem capacitor plugin in Ionic 5.

I don’t believe you can. I would suggest using `HttpClient` instead. `assets` isn’t a real folder on the device’s filesystem; it’s burned into your app binary itself.

---

<div class="post-metadata">

**Author:** ![ab-iym](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@ab-iym](https://forum.ionicframework.com/u/ab-iym)\
**Post date:** [June 11, 2020, 10:34pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/3 "2020-06-11T22:34:07Z")

</div>

@rapropos Makes sense. Thanks for clearing that up for me. In a previous project I managed to access the assets folder using this Cordova plugin (cordova-plugin-file) and it worked perfectly. But I want to move away from Cordova. Thought I could achieve the same with the capacitor plugin.

---

<div class="post-metadata">

**Author:** ![urilp82](https://avatars.discourse-cdn.com/v4/letter/u/bc79bd/32.png) [@urilp82](https://forum.ionicframework.com/u/urilp82)\
**Post date:** [August 27, 2020, 6:11pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/4 "2020-08-27T18:11:35Z")

</div>

Hi,  
i’m running through the same issue. Previously, i was working with Cordova, using the File Plugin in order to open a file inside the “www/assets” folder (“file:///android\_asset/www/assets” in Android), and it also worked perfectly. I had to migrate form Cordova to Capacitor and now i’m trying to read the same assets folder with the [FileSystemPlugin](https://capacitorjs.com/docs/apis/filesystem). Have you find a solution/workaround to this issue?  
Thanks.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [August 27, 2020, 6:35pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/5 "2020-08-27T18:35:10Z")

</div>

> [@urilp82](#):
>
> Have you find a solution/workaround to this issue?

I guess since you didn’t believe me the first time, it’s not likely to do much good for me to repeat it, but there is no “solution/workaround”. assets do not exist from the filesystem’s perspective. They’re an illusion perpetuated by the webview, and you must use HTTP to access them.

---

<div class="post-metadata">

**Author:** ![urilp82](https://avatars.discourse-cdn.com/v4/letter/u/bc79bd/32.png) [@urilp82](https://forum.ionicframework.com/u/urilp82)\
**Post date:** [August 27, 2020, 7:03pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/6 "2020-08-27T19:03:01Z")

</div>

Hi.  
No, i really believe in your previous answer (mostly because i’m stucked with this problem since several hours 😅). Simply i was wondering if the issue’s reporter or someone else could solve this issue using HTTP, as you said.  
I’m gonna try to access this assets folder by HttpClient or another plugin. I will reply to this post if I can figure it out.  
Thanks you very much!

---

<div class="post-metadata">

**Author:** ![mhoxha](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mhoxha](https://forum.ionicframework.com/u/mhoxha)\
**Post date:** [December 3, 2021, 3:18pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/7 "2021-12-03T15:18:49Z")

</div>

Have you find any solution/workaround? I need this also…

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [December 3, 2021, 6:34pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/8 "2021-12-03T18:34:49Z")

</div>

Nothing has changed here. I’m reluctantly going to close this thread because I don’t see any benefit to anybody in my continuing to repeat myself here.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [December 3, 2021, 6:34pm UTC](https://forum.ionicframework.com/t/how-can-i-access-the-apps-assets-folder-using-filesystem-capacitor/191085/9 "2021-12-03T18:34:53Z")

</div>

Closed on December 3, 2021, 6:34pm UTC


