Share via


File.Exists Method

Definition

Tests whether the file or directory denoted by this abstract pathname exists.

[Android.Runtime.Register("exists", "()Z", "GetExistsHandler")]
public virtual bool Exists ();
[<Android.Runtime.Register("exists", "()Z", "GetExistsHandler")>]
abstract member Exists : unit -> bool
override this.Exists : unit -> bool

Returns

true if and only if the file or directory denoted by this abstract pathname exists; false otherwise

Attributes

Remarks

Tests whether the file or directory denoted by this abstract pathname exists.

Java documentation for java.io.File.exists().

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