Class FileFileFilter

  • All Implemented Interfaces:
    java.io.Serializable, FileFilter

    public class FileFileFilter
    extends java.lang.Object
    implements FileFilter, java.io.Serializable
    This filter accepts Files that are files (not directories).

    For example, here is how to print out a list of the real files within the current directory:

     FileSystemManager fsManager = VFS.getManager();
     FileObject dir = fsManager.toFileObject(new File("."));
     FileObject[] files = dir.findFiles(new FileFilterSelector(FileFileFilter.FILE));
     for (int i = 0; i < files.length; i++) {
         System.out.println(files[i]);
     }
     
    Since:
    2.4
    See Also:
    "http://commons.apache.org/proper/commons-io/", Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static FileFilter FILE
      Singleton instance of file filter.
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FileFileFilter()
      Restrictive constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(FileSelectInfo fileSelectInfo)
      Checks to see if the file is a file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FILE

        public static final FileFilter FILE
        Singleton instance of file filter.
    • Constructor Detail

      • FileFileFilter

        protected FileFileFilter()
        Restrictive constructor.