AssetManager find files

Wouldn’t it be nice if assetManager had the ability to locate and list all files ending in a suffix under a specified folder ?

Right now i am doing in a non platform portable way :


File npcLocation = new File(FileUtilities.ASSET_DIRECTORY+“2d/npc/”);

String[] npcList = npcLocation.list(FileUtilities.SUPPORTED_IMAGES);


The problem is that the assetmanager doesn’t (and shouldn’t, really) require an AssetLocator to be able to deliver a list of files. Since you can register the classpath, jar files and even http servers this might not always be possible. What you can do however is do this yourself as you normally know what (and what kind of) roots you add to the assetManager.