Path.Of Método

Definição

Sobrecargas

Nome Description
Of(URI)
Obsoleto.

Retorna um Path convertendo um URI.

Of(String, String[])
Obsoleto.

Of(URI)

Cuidado

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

Retorna um Path convertendo um 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

Parâmetros

uri
URI

o URI a ser convertido

Retornos

o resultado Path

Atributos

Comentários

Retorna um Path convertendo um URI.

Esse método itera nos FileSystemProvider#installedProviders() installed provedores para localizar o provedor identificado pelo URI URI#getScheme scheme do URI fornecido. Os esquemas de URI são comparados sem considerar o caso. Se o provedor for encontrado, seu FileSystemProvider#getPath getPath método será invocado para converter o URI.

No caso do provedor padrão, identificado pelo esquema de URI "file", o URI fornecido tem um componente de caminho não vazio e componentes de consulta e fragmento indefinidos. Se o componente de autoridade pode estar presente é específico da plataforma. O retornado Path está associado ao FileSystems#getDefault default sistema de arquivos.

O provedor padrão fornece uma garantia semelhante <em>ida< e volta/em> à java.io.File classe. Para um determinado Pathp, é garantido que <blockquotePath.of(>p.()).equals(Path#toUri() toUrip.<Path#toAbsolutePath() toAbsolutePath())/blockquote> desde que o originalPath, o URIe o novo Path sejam todos criados em (possivelmente invocações diferentes de) o mesmo Java máquina virtual. Se outros provedores fazem garantias é específico do provedor e, portanto, não especificado.

Adicionado em 11.

Java documentação para java.nio.file.Path.of(java.net.URI).

Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usadas de acordo com os termos descritos na Licença de Atribuição Creative Commons 2.5.

Aplica-se a

Of(String, String[])

Cuidado

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

Parâmetros

first
String
more
String[]

Retornos

Atributos

Aplica-se a