FileSystemProvider Class
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.
Service-provider class for file systems.
[Android.Runtime.Register("java/nio/file/spi/FileSystemProvider", ApiSince=26, DoNotGenerateAcw=true)]
public abstract class FileSystemProvider : Java.Lang.Object
[<Android.Runtime.Register("java/nio/file/spi/FileSystemProvider", ApiSince=26, DoNotGenerateAcw=true)>]
type FileSystemProvider = class
inherit Object
- Inheritance
- Attributes
Remarks
Service-provider class for file systems. The methods defined by the java.nio.file.Files
class will typically delegate to an instance of this class.
A file system provider is a concrete implementation of this class that implements the abstract methods defined by this class. A provider is identified by a URI
#getScheme() scheme
. The default provider is identified by the URI scheme "file". It creates the FileSystem
that provides access to the file systems accessible to the Java virtual machine. The FileSystems
class defines how file system providers are located and loaded. The default provider is typically a system-default provider but may be overridden if the system property java.nio.file.spi.DefaultFileSystemProvider
is set. In that case, the provider has a one argument constructor whose formal parameter type is FileSystemProvider
. All other providers have a zero argument constructor that initializes the provider.
A provider is a factory for one or more FileSystem
instances. Each file system is identified by a URI
where the URI's scheme matches the provider's #getScheme scheme
. The default file system, for example, is identified by the URI "file:///"
. A memory-based file system, for example, may be identified by a URI such as "memory:///?name=logfs"
. The #newFileSystem newFileSystem
method may be used to create a file system, and the #getFileSystem getFileSystem
method may be used to obtain a reference to an existing file system created by the provider. Where a provider is the factory for a single file system then it is provider dependent if the file system is created when the provider is initialized, or later when the newFileSystem
method is invoked. In the case of the default provider, the FileSystem
is created when the provider is initialized.
All of the methods in this class are safe for use by multiple concurrent threads.
Added in 1.7.
Java documentation for java.nio.file.spi.FileSystemProvider
.
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.
Constructors
FileSystemProvider() |
Initializes a new instance of this class. |
FileSystemProvider(IntPtr, JniHandleOwnership) |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
Scheme | |
ThresholdClass | |
ThresholdType |
Methods
CheckAccess(IPath, AccessMode[]) |
Checks the existence, and optionally the accessibility, of a file. |
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Copy(IPath, IPath, ICopyOption[]) |
Copy a file to a target file. |
CreateDirectory(IPath, IFileAttribute[]) |
Creates a new directory. |
CreateLink(IPath, IPath) |
Creates a new link (directory entry) for an existing file. |
CreateSymbolicLink(IPath, IPath, IFileAttribute[]) |
Creates a symbolic link to a target. |
Delete(IPath) |
Deletes a file. |
DeleteIfExists(IPath) |
Deletes a file if it exists. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetFileAttributeView(IPath, Class, LinkOption[]) |
Returns a file attribute view of a given type. |
GetFileStore(IPath) |
Returns the |
GetFileSystem(URI) |
Returns an existing |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetPath(URI) |
Return a |
InstalledProviders() |
Returns a list of the installed file system providers. |
IsHidden(IPath) |
Tells whether or not a file is considered <em>hidden</em>. |
IsSameFile(IPath, IPath) |
Tests if two paths locate the same file. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Move(IPath, IPath, ICopyOption[]) |
Move or rename a file to a target file. |
NewAsynchronousFileChannel(IPath, ICollection<IOpenOption>, IExecutorService, IFileAttribute[]) |
Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. |
NewByteChannel(IPath, ICollection<IOpenOption>, IFileAttribute[]) |
Opens or creates a file, returning a seekable byte channel to access the file. |
NewDirectoryStream(IPath, IDirectoryStreamFilter) |
Opens a directory, returning a |
NewFileChannel(IPath, ICollection<IOpenOption>, IFileAttribute[]) |
Opens or creates a file for reading and/or writing, returning a file channel to access the file. |
NewFileSystem(IPath, IDictionary<String,Object>) |
Constructs a new |
NewFileSystem(URI, IDictionary<String,Object>) |
Constructs a new |
NewInputStream(IPath, IOpenOption[]) |
Opens a file, returning an input stream to read from the file. |
NewOutputStream(IPath, IOpenOption[]) |
Opens or creates a file, returning an output stream that may be used to write bytes to the file. |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
ReadAttributes(IPath, Class, LinkOption[]) |
Reads a file's attributes as a bulk operation. |
ReadAttributes(IPath, String, LinkOption[]) |
Reads a file's attributes as a bulk operation. |
ReadSymbolicLink(IPath) |
Reads the target of a symbolic link. |
SetAttribute(IPath, String, Object, LinkOption[]) |
Sets the value of a file attribute. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |