My application has an assets directory in which I\'ve dumped a bunch of text files I need to load at runtime.
I have a directory full of assets of a particular type
I'm not sure why it works this way, but when I list "/"
, I get root level stuff, not things from my "assets"
directory. I actually found no way to properly list my assets folder in the short time I spent trying.
The workaround I'm using is to create a "subdir"
directory inside of my "assets"
directory. I put all the assets that I want to access in this "subdir"
, and do:
String[] assetsIWant = assetMgr.list("subdir");
I don't know why "/"
lists the "assets"
directory itself as one of it's files, yet you don't have to specify the "assets"
directory when giving list
a path. Maybe someone else knows, but I hope this tip will help you out anyway.