If I want to access a directory, I would to the following:
File f = new File(getFilesDir()+"/name");
And then, if f
is a directory, I can iterate through the files and do a lot of things.
Can I do the same with the drawable/raw folder? I know how to get the id of a file using the name or the name using the id, but I am not sure how can I use drawable as a directory. I also need to use FileInputStream on some files, so I need a file type, not an id or a name.
I found some 'some what' related questions, like this one: Retrieving all Drawable resources from Resources object
But my problem is a bit different. I know how to get a resource in this way. By getting the id you can do lots of things, but as far as I know, you can not use FileInputStream. That's what I need: the possibility to use FileInputStream on a resource that is inside a project folder(drawable or raw).