IFilenameFilter.Accept(File, String) Method

Definition

Tests if a specified file should be included in a file list.

[Android.Runtime.Register("accept", "(Ljava/io/File;Ljava/lang/String;)Z", "GetAccept_Ljava_io_File_Ljava_lang_String_Handler:Java.IO.IFilenameFilterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Accept (Java.IO.File? dir, string? name);
[<Android.Runtime.Register("accept", "(Ljava/io/File;Ljava/lang/String;)Z", "GetAccept_Ljava_io_File_Ljava_lang_String_Handler:Java.IO.IFilenameFilterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Accept : Java.IO.File * string -> bool

Parameters

dir
File

the directory in which the file was found.

name
String

the name of the file.

Returns

true if and only if the name should be included in the file list; false otherwise.

Attributes

Remarks

Tests if a specified file should be included in a file list.

Java documentation for java.io.FilenameFilter.accept(java.io.File, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to