Поделиться через


FileSystemProvider.NewAsynchronousFileChannel Метод

Определение

Открывает или создает файл для чтения и записи, возвращая асинхронный канал файлов для доступа к файлу.

[Android.Runtime.Register("newAsynchronousFileChannel", "(Ljava/nio/file/Path;Ljava/util/Set;Ljava/util/concurrent/ExecutorService;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/AsynchronousFileChannel;", "GetNewAsynchronousFileChannel_Ljava_nio_file_Path_Ljava_util_Set_Ljava_util_concurrent_ExecutorService_arrayLjava_nio_file_attribute_FileAttribute_Handler", ApiSince=26)]
public virtual Java.Nio.Channels.AsynchronousFileChannel? NewAsynchronousFileChannel (Java.Nio.FileNio.IPath? path, System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption>? options, Java.Util.Concurrent.IExecutorService? executor, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("newAsynchronousFileChannel", "(Ljava/nio/file/Path;Ljava/util/Set;Ljava/util/concurrent/ExecutorService;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/AsynchronousFileChannel;", "GetNewAsynchronousFileChannel_Ljava_nio_file_Path_Ljava_util_Set_Ljava_util_concurrent_ExecutorService_arrayLjava_nio_file_attribute_FileAttribute_Handler", ApiSince=26)>]
abstract member NewAsynchronousFileChannel : Java.Nio.FileNio.IPath * System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption> * Java.Util.Concurrent.IExecutorService * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.Channels.AsynchronousFileChannel
override this.NewAsynchronousFileChannel : Java.Nio.FileNio.IPath * System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption> * Java.Util.Concurrent.IExecutorService * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.Channels.AsynchronousFileChannel

Параметры

path
IPath

Путь к файлу для открытия или создания

options
ICollection<IOpenOption>

параметры, определяющие способ открытия файла

executor
IExecutorService

пул потоков или null связывание канала с пулом потоков по умолчанию

attrs
IFileAttribute[]

необязательный список атрибутов файла для атомарного задания при создании файла

Возвращаемое значение

новый асинхронный канал файлов

Атрибуты

Комментарии

Документация по Java для java.nio.file.spi.FileSystemProvider.newAsynchronousFileChannel(java.nio.file.Path, java.util.Set, java.util.concurrent.ExecutorService, java.nio.file.attribute.FileAttribute).

Части этой страницы — это изменения на основе работы, созданной и общей проектом с открытым исходным кодом Android и используемой в соответствии с условиями, описанными в лицензии Creative Commons 2.5 Attribution.

Применяется к