java - How to get folders' name listed in Assets folder? Only folders' names but not any file names -
scenario: assets directory - assets/folder1; assets/folder2; , on. files in folder1 , other folders, such asssets/folder1/file1, , others, asssets/folder/somefile1, , others.
i want code access names of folder names assets folder i.e., list.
- folder1
- folder2
and on.
new file("file:///android_asset/").listfiles(); new file("file:///android_asset/").list();
both of above statements return null. path assets folder? thanks!
you can use file.listfiles() files in given directory (including sub-directories). these can names.
Comments
Post a Comment