1. /*
  2. * @(#)FileFilter.java 1.11 03/12/19
  3. *
  4. * Copyright 2004 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. }