共用方式為


AsynchronousFileChannel.Open 方法

定義

多載

Open(IPath, ICollection<IOpenOption>, IExecutorService, IFileAttribute[])

開啟或建立檔案以供讀取和/或寫入,並傳回異步檔案通道以存取檔案。

Open(IPath, IOpenOption[])

開啟或建立檔案以供讀取和/或寫入,並傳回異步檔案通道以存取檔案。

Open(IPath, ICollection<IOpenOption>, IExecutorService, IFileAttribute[])

開啟或建立檔案以供讀取和/或寫入,並傳回異步檔案通道以存取檔案。

[Android.Runtime.Register("open", "(Ljava/nio/file/Path;Ljava/util/Set;Ljava/util/concurrent/ExecutorService;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/AsynchronousFileChannel;", "", ApiSince=26)]
public static Java.Nio.Channels.AsynchronousFileChannel? Open (Java.Nio.FileNio.IPath? file, System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption>? options, Java.Util.Concurrent.IExecutorService? executor, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("open", "(Ljava/nio/file/Path;Ljava/util/Set;Ljava/util/concurrent/ExecutorService;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/AsynchronousFileChannel;", "", ApiSince=26)>]
static member Open : 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

參數

file
IPath

要開啟或建立之檔案的路徑

options
ICollection<IOpenOption>

指定檔案開啟方式的選項

executor
IExecutorService
attrs
IFileAttribute[]

傳回

新的異步檔案通道

屬性

備註

java.nio.channels.AsynchronousFileChannel.open(java.nio.file.Path, java.nio.file.OpenOption)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

Open(IPath, IOpenOption[])

開啟或建立檔案以供讀取和/或寫入,並傳回異步檔案通道以存取檔案。

[Android.Runtime.Register("open", "(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/AsynchronousFileChannel;", "", ApiSince=26)]
public static Java.Nio.Channels.AsynchronousFileChannel? Open (Java.Nio.FileNio.IPath? file, params Java.Nio.FileNio.IOpenOption[]? options);
[<Android.Runtime.Register("open", "(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/AsynchronousFileChannel;", "", ApiSince=26)>]
static member Open : Java.Nio.FileNio.IPath * Java.Nio.FileNio.IOpenOption[] -> Java.Nio.Channels.AsynchronousFileChannel

參數

file
IPath

要開啟或建立之檔案的路徑

options
IOpenOption[]

指定檔案開啟方式的選項

傳回

新的異步檔案通道

屬性

備註

java.nio.channels.AsynchronousFileChannel.open(java.nio.file.Path, java.nio.file.OpenOption)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於