Compartilhar via


IPath.Equals(Object) Method

Definition

Tests this path for equality with the given object.

[Android.Runtime.Register("equals", "(Ljava/lang/Object;)Z", "GetEquals_Ljava_lang_Object_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public bool Equals (Java.Lang.Object? other);
[<Android.Runtime.Register("equals", "(Ljava/lang/Object;)Z", "GetEquals_Ljava_lang_Object_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Equals : Java.Lang.Object -> bool

Parameters

other
Object

the object to which this object is to be compared

Returns

true if, and only if, the given object is a Path that is identical to this Path

Attributes

Remarks

Tests this path for equality with the given object.

If the given object is not a Path, or is a Path associated with a different FileSystem, then this method returns false.

Whether or not two path are equal depends on the file system implementation. In some cases the paths are compared without regard to case, and others are case sensitive. This method does not access the file system and the file is not required to exist. Where required, the Files#isSameFile isSameFile method may be used to check if two paths locate the same file.

This method satisfies the general contract of the java.lang.Object#equals(Object) Object.equals method.

Java documentation for java.nio.file.Path.equals(java.lang.Object).

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