How does file access by path work with scoped storage?

I’m seeing questions pop up in the Discord about file access by path, how does that work post scoped storage? Does Kustom intercept paths pointing to the Kustom folder somehow and then use the SAF to load files, any other special cases, …?

1 Like

I will try to add this to the FAQ somewhere, in the meanwhile here is a brief summary.

Access via file:///

  • Path is /sdcard/something: kustom will try to understand if there is a scoped storage access to that folder and try to open the file, so if you write “file:///sdcard/Kustom/file.txt” and Kustom folder is set to /primarystorage/Kustom this should work
  • Path is something else: won’t work

Access via flow → If you access a file via Flow this should always work as it allows you to pick eerything

Future development:
I am considering adding a a Global Folder, basically selecting it will ask Android to request access to a Folder then you could use something like gv:///globalname/… to access the file or simply gv(globalname)/file.txt, problem of this approach is that presets won’t work once imported (as for flows) until you select a folder, so ideally i would have to show the user this when importing.

1 Like

This topic was automatically closed 25 days after the last reply. New replies are no longer allowed.