次の方法で共有


FileSystem.Close Method

Definition

Closes this file system.

[Android.Runtime.Register("close", "()V", "GetCloseHandler", ApiSince=26)]
public abstract void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler", ApiSince=26)>]
abstract member Close : unit -> unit

Implements

Attributes

Remarks

Closes this file system.

After a file system is closed then all subsequent access to the file system, either by methods defined by this class or on objects associated with this file system, throw ClosedFileSystemException. If the file system is already closed then invoking this method has no effect.

Closing a file system will close all open java.nio.channels.Channel channels, DirectoryStream directory-streams, WatchService watch-service, and other closeable objects associated with this file system. The FileSystems#getDefault default file system cannot be closed.

Java documentation for java.nio.file.FileSystem.close().

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