Share via


FileSystemProvider.NewFileSystem Method

Definition

Overloads

NewFileSystem(URI, IDictionary<String,Object>)

Constructs a new FileSystem object identified by a URI.

NewFileSystem(IPath, IDictionary<String,Object>)

Constructs a new FileSystem to access the contents of a file as a file system.

NewFileSystem(URI, IDictionary<String,Object>)

Constructs a new FileSystem object identified by a URI.

[Android.Runtime.Register("newFileSystem", "(Ljava/net/URI;Ljava/util/Map;)Ljava/nio/file/FileSystem;", "GetNewFileSystem_Ljava_net_URI_Ljava_util_Map_Handler", ApiSince=26)]
public abstract Java.Nio.FileNio.FileSystem? NewFileSystem (Java.Net.URI? uri, System.Collections.Generic.IDictionary<string,object>? env);
[<Android.Runtime.Register("newFileSystem", "(Ljava/net/URI;Ljava/util/Map;)Ljava/nio/file/FileSystem;", "GetNewFileSystem_Ljava_net_URI_Ljava_util_Map_Handler", ApiSince=26)>]
abstract member NewFileSystem : Java.Net.URI * System.Collections.Generic.IDictionary<string, obj> -> Java.Nio.FileNio.FileSystem

Parameters

uri
URI

URI reference

env
IDictionary<String,Object>

A map of provider specific properties to configure the file system; may be empty

Returns

A new file system

Attributes

Remarks

Constructs a new FileSystem object identified by a URI. This method is invoked by the FileSystems#newFileSystem(URI,Map) method to open a new file system identified by a URI.

The uri parameter is an absolute, hierarchical URI, with a scheme equal (without regard to case) to the scheme supported by this provider. The exact form of the URI is highly provider dependent. The env parameter is a map of provider specific properties to configure the file system.

This method throws FileSystemAlreadyExistsException if the file system already exists because it was previously created by an invocation of this method. Once a file system is java.nio.file.FileSystem#close closed it is provider-dependent if the provider allows a new file system to be created with the same URI as a file system it previously created.

Java documentation for java.nio.file.spi.FileSystemProvider.newFileSystem(java.net.URI, java.util.Map<java.lang.String, ?>).

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.

Applies to

NewFileSystem(IPath, IDictionary<String,Object>)

Constructs a new FileSystem to access the contents of a file as a file system.

[Android.Runtime.Register("newFileSystem", "(Ljava/nio/file/Path;Ljava/util/Map;)Ljava/nio/file/FileSystem;", "GetNewFileSystem_Ljava_nio_file_Path_Ljava_util_Map_Handler", ApiSince=26)]
public virtual Java.Nio.FileNio.FileSystem? NewFileSystem (Java.Nio.FileNio.IPath? path, System.Collections.Generic.IDictionary<string,object>? env);
[<Android.Runtime.Register("newFileSystem", "(Ljava/nio/file/Path;Ljava/util/Map;)Ljava/nio/file/FileSystem;", "GetNewFileSystem_Ljava_nio_file_Path_Ljava_util_Map_Handler", ApiSince=26)>]
abstract member NewFileSystem : Java.Nio.FileNio.IPath * System.Collections.Generic.IDictionary<string, obj> -> Java.Nio.FileNio.FileSystem
override this.NewFileSystem : Java.Nio.FileNio.IPath * System.Collections.Generic.IDictionary<string, obj> -> Java.Nio.FileNio.FileSystem

Parameters

path
IPath

The path to the file

env
IDictionary<String,Object>

A map of provider specific properties to configure the file system; may be empty

Returns

A new file system

Attributes

Remarks

Constructs a new FileSystem to access the contents of a file as a file system.

This method is intended for specialized providers of pseudo file systems where the contents of one or more files is treated as a file system. The env parameter is a map of provider specific properties to configure the file system.

If this provider does not support the creation of such file systems or if the provider does not recognize the file type of the given file then it throws UnsupportedOperationException. The default implementation of this method throws UnsupportedOperationException.

Java documentation for java.nio.file.spi.FileSystemProvider.newFileSystem(java.nio.file.Path, java.util.Map<java.lang.String, ?>).

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.

Applies to