# Permission issue in reading file from external storage

**URL:** https://discourse.processing.org/t/permission-issue-in-reading-file-from-external-storage/34184
**Category:** Processing for Android
**Created:** [December 18, 2021, 1:13pm UTC](https://discourse.processing.org/t/permission-issue-in-reading-file-from-external-storage/34184 "2021-12-18T13:13:46Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![bigboss97](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@bigboss97](https://discourse.processing.org/u/bigboss97)
#### Post date: [December 19, 2021, 1:33am UTC](https://discourse.processing.org/t/permission-issue-in-reading-file-from-external-storage/34184/5 "2021-12-19T01:33:52Z")

</div>

Thank you for all the information. I’ll go through it and see.  
Currently, I’m still seeing _loadStrings_():

> java.lang.IllegalArgumentException: File /storage/emulated/0/twinkBOSS/env.txt contains a path separator

which I had before. I also tried ‘//’ without success.

I also tried:

> [@File contains a path separator](https://discourse.processing.org/t/file-contains-a-path-separator/6865/10):
>
> Well, I don’t know, how I did it, but the folowing code works: import processing.sound.\*; String filePath = "/sdcard/Sketchbook/VisualizerProject/data/song.mp3"; void setup(){ stealFile(filePath, "song.mp3"); SoundFile sf = new SoundFile(this, /\*dataPath("song.mp3")\*/filePath); sf.play(); } void draw(){ background(0); } boolean stealFile(String from, String filename){ println("Stealing file \"" + from + "\"..."); if(!(new File(from).exists())){ println(" Fail: Input path i…

I added:

> println( listFile[i]);

in the ‘else’ section and didn’t see any file listed at all. It basically goes through all directories recursively without listing any files. Probably, missing permission in accessing files. I’ve also found articles about permission changes in Android 10 and some older solutions won’t work any more. Can this be a reason?

---

_[View the full topic](https://discourse.processing.org/t/permission-issue-in-reading-file-from-external-storage/34184)._
