FileSystemProvider.NewByteChannel 方法

定义

打开或创建文件,返回可查找字节通道以访问该文件。

[Android.Runtime.Register("newByteChannel", "(Ljava/nio/file/Path;Ljava/util/Set;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/SeekableByteChannel;", "GetNewByteChannel_Ljava_nio_file_Path_Ljava_util_Set_arrayLjava_nio_file_attribute_FileAttribute_Handler", ApiSince=26)]
public abstract Java.Nio.Channels.ISeekableByteChannel? NewByteChannel (Java.Nio.FileNio.IPath? path, System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption>? options, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("newByteChannel", "(Ljava/nio/file/Path;Ljava/util/Set;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/SeekableByteChannel;", "GetNewByteChannel_Ljava_nio_file_Path_Ljava_util_Set_arrayLjava_nio_file_attribute_FileAttribute_Handler", ApiSince=26)>]
abstract member NewByteChannel : Java.Nio.FileNio.IPath * System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption> * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.Channels.ISeekableByteChannel

参数

path
IPath

要打开或创建的文件的路径

options
ICollection<IOpenOption>

指定文件打开方式的选项

attrs
IFileAttribute[]

创建文件时要以原子方式设置的文件属性的可选列表

返回

新的可查找字节通道

属性

注解

适用于 . 的 java.nio.file.spi.FileSystemProvider.newByteChannel(java.nio.file.Path, java.util.Set, java.nio.file.attribute.FileAttribute)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于