Package java.io

Interface FilenameFilter


public interface FilenameFilter
An interface for filtering File objects based on their names or the directory they reside in.
See Also:
File, File.list(FilenameFilter)
  • Method Summary

    Modifier and Type Method Description
    boolean accept​(File dir, String filename)
    Indicates if a specific filename matches this filter.
  • Method Details

    • accept

      boolean accept​(File dir, String filename)
      Indicates if a specific filename matches this filter.
      Parameters:
      dir - the directory in which the filename was found.
      filename - the name of the file in dir to test.
      Returns:
      true if the filename matches the filter and can be included in the list, false otherwise.