Sdílet prostřednictvím


URLStreamHandler.SameFile(URL, URL) Method

Definition

Compare two urls to see whether they refer to the same file, i.

[Android.Runtime.Register("sameFile", "(Ljava/net/URL;Ljava/net/URL;)Z", "GetSameFile_Ljava_net_URL_Ljava_net_URL_Handler")]
protected virtual bool SameFile (Java.Net.URL? u1, Java.Net.URL? u2);
[<Android.Runtime.Register("sameFile", "(Ljava/net/URL;Ljava/net/URL;)Z", "GetSameFile_Ljava_net_URL_Ljava_net_URL_Handler")>]
abstract member SameFile : Java.Net.URL * Java.Net.URL -> bool
override this.SameFile : Java.Net.URL * Java.Net.URL -> bool

Parameters

u1
URL

a URL object

u2
URL

a URL object

Returns

true if u1 and u2 refer to the same file

Attributes

Remarks

Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path. This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called indirectly by java.net.URL class.

Added in 1.3.

Java documentation for java.net.URLStreamHandler.sameFile(java.net.URL, java.net.URL).

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