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
Post a Comment