IPath.CompareTo(IPath) Method

Definition

Compares two abstract paths lexicographically.

[Android.Runtime.Register("compareTo", "(Ljava/nio/file/Path;)I", "GetCompareTo_Ljava_nio_file_Path_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public int CompareTo (Java.Nio.FileNio.IPath? other);
[<Android.Runtime.Register("compareTo", "(Ljava/nio/file/Path;)I", "GetCompareTo_Ljava_nio_file_Path_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member CompareTo : Java.Nio.FileNio.IPath -> int

Parameters

other
IPath

the path compared to this path.

Returns

zero if the argument is #equals equal to this path, a value less than zero if this path is lexicographically less than the argument, or a value greater than zero if this path is lexicographically greater than the argument

Attributes

Remarks

Compares two abstract paths lexicographically. The ordering defined by this method is provider specific, and in the case of the default provider, platform specific. This method does not access the file system and neither file is required to exist.

This method may not be used to compare paths that are associated with different file system providers.

Java documentation for java.nio.file.Path.compareTo(java.nio.file.Path).

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