共用方式為


Path.Of 方法

定義

多載

Of(URI)
已淘汰.

Path藉由轉換 URI 傳回 。

Of(String, String[])
已淘汰.

Of(URI)

警告

Use 'Java.Nio.FileNio.IPath.Of'. This class will be removed in a future release.

Path藉由轉換 URI 傳回 。

[Android.Runtime.Register("of", "(Ljava/net/URI;)Ljava/nio/file/Path;", "", ApiSince=34)]
[System.Obsolete("Use 'Java.Nio.FileNio.IPath.Of'. This class will be removed in a future release.")]
public static Java.Nio.FileNio.IPath? Of (Java.Net.URI? uri);
[<Android.Runtime.Register("of", "(Ljava/net/URI;)Ljava/nio/file/Path;", "", ApiSince=34)>]
[<System.Obsolete("Use 'Java.Nio.FileNio.IPath.Of'. This class will be removed in a future release.")>]
static member Of : Java.Net.URI -> Java.Nio.FileNio.IPath

參數

uri
URI

要轉換的 URI

傳回

產生的 Path

屬性

備註

Path藉由轉換 URI 傳回 。

這個方法會 FileSystemProvider#installedProviders() installed 逐一查看提供者,以找出指定 URI 的 URI URI#getScheme scheme 所識別的提供者。 不論大小寫為何,都會比較URI配置。 如果找到提供者,則會叫用其 FileSystemProvider#getPath getPath 方法來轉換 URI。

在預設提供者的案例中,由 URI 配置 「file」 識別,指定的 URI 具有非空白路徑元件,以及未定義的查詢和片段元件。 授權單位元件是否存在於平臺特定。 傳回的 Path 與文件系統相關聯 FileSystems#getDefault default

預設提供者提供與 類別類似的 <em> 來回</em> 保證 java.io.File 。 對於指定的 Pathp,只要原始 Path的 、URI、 和 都是Path在相同 Java 虛擬機中建立的區塊quote p/blockquote,就保證<區塊代碼 p.())Path#toAbsolutePath() toAbsolutePathPath#toUri() toUri<()).equals(./blockquote>>Path.of( 都是在相同 Java 虛擬機中建立的。 其他提供者是否保證為提供者特定,因此未指定。

已在11中新增。

java.nio.file.Path.of(java.net.URI)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

Of(String, String[])

警告

Use 'Java.Nio.FileNio.IPath.Of'. This class will be removed in a future release.

[Android.Runtime.Register("of", "(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;", "", ApiSince=34)]
[System.Obsolete("Use 'Java.Nio.FileNio.IPath.Of'. This class will be removed in a future release.")]
public static Java.Nio.FileNio.IPath? Of (string? first, params string[]? more);
[<Android.Runtime.Register("of", "(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;", "", ApiSince=34)>]
[<System.Obsolete("Use 'Java.Nio.FileNio.IPath.Of'. This class will be removed in a future release.")>]
static member Of : string * string[] -> Java.Nio.FileNio.IPath

參數

first
String
more
String[]

傳回

屬性

適用於