Condividi tramite


Path.Of Metodo

Definizione

Overload

Of(URI)
Obsoleti.

Restituisce un oggetto Path convertendo un URI.

Of(String, String[])
Obsoleti.

Of(URI)

Attenzione

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

Restituisce un oggetto Path convertendo un 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

Parametri

uri
URI

URI da convertire

Restituisce

l'oggetto risultante Path

Attributi

Commenti

Restituisce un oggetto Path convertendo un URI.

Questo metodo esegue l'iterazione sui FileSystemProvider#installedProviders() installed provider per individuare il provider identificato dall'URI URI#getScheme scheme dell'URI specificato. Gli schemi URI vengono confrontati senza considerare la distinzione tra maiuscole e minuscole. Se il provider viene trovato, FileSystemProvider#getPath getPath viene richiamato il relativo metodo per convertire l'URI.

Nel caso del provider predefinito, identificato dallo schema URI "file", l'URI specificato ha un componente percorso non vuoto e componenti di query e frammenti non definiti. Se il componente dell'autorità può essere presente è specifico della piattaforma. L'oggetto restituito Path è associato al FileSystems#getDefault default file system.

Il provider predefinito fornisce una garanzia di round trip</em> simile <>alla java.io.File classe . Per un determinato Pathp è garantito che <blockquote p<.()).equals(Path#toUri() toUri())Path#toAbsolutePath() toAbsolutePath./blockquote>>Path.of( fino a quando l'originale Path, e URIil nuovo Path vengono tutti creati in (possibilmente chiamate diverse) della stessa macchina virtuale Java. Indica se altri provider effettuano garanzie specifiche del provider e pertanto non specificate.

Aggiunta in 11.

Documentazione java per java.nio.file.Path.of(java.net.URI).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal progetto Open Source Android e usato in base ai termini descritti nella licenza Creative Commons 2.5 Attribuzione.

Si applica a

Of(String, String[])

Attenzione

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

Parametri

first
String
more
String[]

Restituisce

Attributi

Si applica a