How to query to select all file in specific folder in android? -


i want files in specific folder. can give me suggestion how query files in specific folder using manage query.

try way

arraylist<file> mfiles = new arraylist<file>();           file mdirectory;          string folderpath = "/mnt/sdcard/download";          mdirectory = new file(folderpath);          extensionfilenamefilter filter = new extensionfilenamefilter(acceptedfileextensions);              // files in directory             file[] files = mdirectory.listfiles(filter);             if (files != null && files.length > 0) {                 (file f : files) {                      mfiles.add(f);                 }                  collections.sort(mfiles, new filecomparator());             } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -