語言

IPath.EndsWith 方法

定義

多載

名稱 Description
EndsWith(IPath)

測試該路徑是否以該路徑結束。

EndsWith(String)

測試此路徑是否以 Path,該路徑是透過轉換給定路徑字串,完全按照方法指定 #endsWith(Path) endsWith(Path) 的方式來構造。

EndsWith(IPath)

測試該路徑是否以該路徑結束。

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

參數

other
IPath

給定路徑

傳回

true 若此路徑以該路徑結束;否則 false

屬性

備註

測試該路徑是否以該路徑結束。

若給定路徑有 <em 個 N</em> 元素且無根分量,且該路徑有 <em>N</em> 或更多元素,則該路徑以該路徑結束,且從離根最遠的元素開始的最後 <em>N</em>> 元素相等。

若給定路徑有根分量,則該路徑以該路徑結束;若該路徑<的根分支 em 與<>該路徑的根分支 em>結尾,且兩條路徑對應的元素相等。 該路徑的根元件是否以該路徑的根元件結尾,則取決於檔案系統。 若此路徑沒有根成分,且給定路徑有根節點,則該路徑不會以該路徑結束。

若給定路徑與該路徑不同 FileSystem ,則 false 回傳。

的 java.nio.file.Path.endsWith(java.nio.file.Path)Java 檔。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

EndsWith(String)

測試此路徑是否以 Path,該路徑是透過轉換給定路徑字串,完全按照方法指定 #endsWith(Path) endsWith(Path) 的方式來構造。

[Android.Runtime.Register("endsWith", "(Ljava/lang/String;)Z", "GetEndsWith_Ljava_lang_String_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public bool EndsWith(string? other);
[<Android.Runtime.Register("endsWith", "(Ljava/lang/String;)Z", "GetEndsWith_Ljava_lang_String_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member EndsWith : string -> bool

參數

other
String

給定的路徑串

傳回

true 若此路徑以該路徑結束;否則 false

屬性

備註

測試此路徑是否以 Path,該路徑是透過轉換給定路徑字串,完全按照方法指定 #endsWith(Path) endsWith(Path) 的方式來構造。 以 UNIX 為例,路徑「foo/bar」以「foo/bar」和「bar」結尾。 它不以「r」或「/bar」結尾。 請注意,尾隨分隔符未被考慮,因此在「」中呼叫此bar/String方法Pathfoo/bar時會返回 true。

的 java.nio.file.Path.endsWith(java.lang.String)Java 檔。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於