FileSystemProvider.GetFileSystem(URI) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an existing FileSystem
created by this provider.
[Android.Runtime.Register("getFileSystem", "(Ljava/net/URI;)Ljava/nio/file/FileSystem;", "GetGetFileSystem_Ljava_net_URI_Handler", ApiSince=26)]
public abstract Java.Nio.FileNio.FileSystem? GetFileSystem (Java.Net.URI? uri);
[<Android.Runtime.Register("getFileSystem", "(Ljava/net/URI;)Ljava/nio/file/FileSystem;", "GetGetFileSystem_Ljava_net_URI_Handler", ApiSince=26)>]
abstract member GetFileSystem : Java.Net.URI -> Java.Nio.FileNio.FileSystem
Parameters
- uri
- URI
URI reference
Returns
The file system
- Attributes
Remarks
Returns an existing FileSystem
created by this provider.
This method returns a reference to a FileSystem
that was created by invoking the #newFileSystem(URI,Map) newFileSystem(URI,Map)
method. File systems created the #newFileSystem(Path,Map) newFileSystem(Path,Map)
method are not returned by this method. The file system is identified by its URI
. Its exact form is highly provider dependent. In the case of the default provider the URI's path component is "/"
and the authority, query and fragment components are undefined (Undefined components are represented by null
).
Once a file system created by this provider is java.nio.file.FileSystem#close closed
it is provider-dependent if this method returns a reference to the closed file system or throws FileSystemNotFoundException
. If the provider allows a new file system to be created with the same URI as a file system it previously created then this method throws the exception if invoked after the file system is closed (and before a new instance is created by the #newFileSystem newFileSystem
method).
If a security manager is installed then a provider implementation may require to check a permission before returning a reference to an existing file system. In the case of the FileSystems#getDefault default
file system, no permission check is required.
Java documentation for java.nio.file.spi.FileSystemProvider.getFileSystem(java.net.URI)
.
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.