Back to project page filelistview.
The source code is released under:
MIT License
If you think the Android project filelistview listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jcw.andriod.fileListView; /*from ww w .j a v a 2 s. c o m*/ import java.io.*; /* * Author - Woodruff * */ public class FileUtils { /* this is a method that gets out the FILES from a given directory */ public static File[] listFiles(File parentDir) { return parentDir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String filename) { return !(new File(dir + "/" + filename).isDirectory()); } }); } /* returns a list of DIRECTORIES in the parent file */ public static File[] listDirectories(File parentDir) { return parentDir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String filename) { return new File(dir + "/" + filename).isDirectory(); } }); } }