how to get file name and file count from asset folder in Android?

喜欢而已 提交于 2019-12-18 07:24:59

问题


I have some media file in my asset folder. I want to get all media files names and files count from my asset folder.


回答1:


A little googling might have helped you!

try this:

AssetManager assetManager = getAssets();
String[] files = assetManager.list("your_folder_name_inside_assets");            
List<String> it = new LinkedList<String>(Arrays.asList(files));


来源:https://stackoverflow.com/questions/22861480/how-to-get-file-name-and-file-count-from-asset-folder-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!