Skip to content

Most visited

Recently visited

navigation
Added in API level 1

FilenameFilter

public interface FilenameFilter

java.io.FilenameFilter


An interface for filtering File objects based on their names or the directory they reside in.

See also:

Summary

Public methods

abstract boolean accept(File dir, String filename)

Indicates if a specific filename matches this filter.

Public methods

accept

Added in API level 1
boolean accept (File dir, 
                String filename)

Indicates if a specific filename matches this filter.

Parameters
dir File: the directory in which the filename was found.
filename String: the name of the file in dir to test.
Returns
boolean true if the filename matches the filter and can be included in the list, false otherwise.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.