- Home /
How can I get a list of files in StreamingAssets on Android?
I've got a bunch of files in the StreamingAssets directory. I don't need to read the actual files yet, but I need to get a list (or other collection) of what is there. On most platforms, this is working fine:
jsonFilesPath = Application.streamingAssetsPath;
var dir = new DirectoryInfo(jsonFilesPath);
var filesInfo = dir.GetFiles("*.json");
for (file in filesInfo) {
//do some stuff
}
But on Android, it can't find anything. Apparently it's because Android stores the assets in a jar file. I know I can use WWW to read a specific file from it, but how can I simply get a list of them? A list of file names would be sufficient, but including file size, etc. would be ideal.
Your answer
Follow this Question
Related Questions
StreamingAssets GIF images on android 0 Answers
Android - Access Video from StreamingAssets 0 Answers
How to find list of files in "StreamingAssets" folder in Android 1 Answer
Can't read lines from file by using StreamReader on Android platform 2 Answers
Download video and put it into StreamingAssets folder 0 Answers