1. /*
  2. * @(#)FileFilter.java 1.10 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.io;
  8. /**
  9. * A filter for abstract pathnames.
  10. *
  11. * <p> Instances of this interface may be passed to the <code>{@link
  12. * File#listFiles(java.io.FileFilter) listFiles(FileFilter)}</code> method
  13. * of the <code>{@link java.io.File}</code> class.
  14. *
  15. * @since 1.2
  16. */
  17. public interface FileFilter {
  18. /**
  19. * Tests whether or not the specified abstract pathname should be
  20. * included in a pathname list.
  21. *
  22. * @param pathname The abstract pathname to be tested
  23. * @return <code>true</code> if and only if <code>pathname</code>
  24. * should be included
  25. */
  26. boolean accept(File pathname);
  27. }