I am developer and I want list All folders in path in file manager but show all files and folders in method file.list() please help me to show all folders not files in path.
File file = new File("Path");
if(file.exists() && file.canRead()) {
String[] list = file.list();
int len = list.length;
/* add files/folder to arraylist depending on hidden status */
for (int i = 0; i < len; i++) {
if(list[i].toString().charAt(0) != '.')
mDirContent.add(list[i]);
}
}