Package java.io Previous
Previous
Java API
Java API
Index
Index
Next
Next

Interface FilenameFilter

Methods

public  interface  java.io.FilenameFilter
{
        // Methods
    public abstract boolean accept(File  dir, String  name);	
}

Instances of classes that implement this interface are used to filter filenames. These instances are used to filter directory listings in the list method of class File , and by the Abstract Window Toolkit's file dialog component .
See Also: File .


Methods


accept

public abstract boolean accept(File  dir, String  name) 

Determines whether a specified file should be included in a file list.

Return Value:

Returns true if name should be included in file list; false otherwise.

ParameterDescription
dir the directory in which the file was found
name the name of the file



Top© 1996 Sun Microsystems, Inc. All rights reserved.