Android Open Source - filelistview File Utils






From Project

Back to project page filelistview.

License

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.

Java Source Code

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();
            }
        });
    }
}




Java Source Code List

com.jcw.andriod.fileListView.FileListAdapter.java
com.jcw.andriod.fileListView.FileListItemView.java
com.jcw.andriod.fileListView.FileListView.java
com.jcw.andriod.fileListView.FileOpenView.java
com.jcw.andriod.fileListView.FileSaveView.java
com.jcw.andriod.fileListView.FileUtils.java
com.jcw.andriod.fileListView.ListUtils.java
com.jcw.andriod.fileListView.MainActivity.java
com.jcw.andriod.fileListView.PictureGenerator.java
com.jcw.andriod.fileListView.dialogs.FileSelectDialog.java