Share via


FileSystemProvider.NewByteChannel Method

Definition

Opens or creates a file, returning a seekable byte channel to access the file.

[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

Parameters

path
IPath

the path to the file to open or create

options
ICollection<IOpenOption>

options specifying how the file is opened

attrs
IFileAttribute[]

an optional list of file attributes to set atomically when creating the file

Returns

a new seekable byte channel

Attributes

Remarks

Java documentation for java.nio.file.spi.FileSystemProvider.newByteChannel(java.nio.file.Path, java.util.Set, java.nio.file.attribute.FileAttribute).

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