File.CompareTo(File) Method

Definition

Compares two abstract pathnames lexicographically.

[Android.Runtime.Register("compareTo", "(Ljava/io/File;)I", "GetCompareTo_Ljava_io_File_Handler")]
public virtual int CompareTo (Java.IO.File pathname);
[<Android.Runtime.Register("compareTo", "(Ljava/io/File;)I", "GetCompareTo_Ljava_io_File_Handler")>]
abstract member CompareTo : Java.IO.File -> int
override this.CompareTo : Java.IO.File -> int

Parameters

pathname
File

The abstract pathname to be compared to this abstract pathname

Returns

Zero if the argument is equal to this abstract pathname, a value less than zero if this abstract pathname is lexicographically less than the argument, or a value greater than zero if this abstract pathname is lexicographically greater than the argument

Attributes

Remarks

Compares two abstract pathnames lexicographically. The ordering defined by this method depends upon the underlying system. On UNIX systems, alphabetic case is significant in comparing pathnames; on Microsoft Windows systems it is not.

Added in 1.2.

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

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

See also