Get the folder name from the Assets directory

I am trying to get the names of my folders in "assets". I can get the file names from AssetManager using the assetManager.list () method. But the problem is that it only returns file names, not folder names. Therefore, I am trying to use the listFiles () method, but I cannot access the Assets directory; I will try the following:

File dir = new File ("file:///android_asset/"); File[] files= dir.listFiles(); 

But this does not work: (... Is there a way to get the folder names contained in the Assets directory?

+5
android
Jul 19 '10 at 13:05
source share
1 answer

URL: /// android_asset / "does not indicate a specific directory, it is used by WebView to access assets. Assets are read-only and defined at compile time, so he suggested that their directory structure is known to the programmer. This is inconvenient, but what he developed

+2
Jul 19 '10 at 13:18
source share
— -



All Articles