Packages This Package Prev Next Index
§2.26 Interface FilenameFilter
public interface java.io.FilenameFilter
{
// Methods
public abstract boolean accept(File dir, String name); §2.26.1
}
Instances of classes that implement this interface are used to filter filenames. These
instances are used to filter directory listings in the list method (I-§2.7.24) of class File
(I-§2.7), and by the Abstract Window Toolkit's file dialog component (II-§1.15.13).
-
- See Also:
- File .
accept
public abstract boolean accept(File dir, String name)
- Determines whether a specified file should be included in a file list.
- Parameters:
dir
- the directory in which the file was found
name
- the name of the file
- Returns:
- true if name should be included in file list; false otherwise.
Packages This Package Prev Next Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc.
All rights reserved
Please send any comments or corrections to doug.kramer@sun.com