AsynchronousFileChannel.Open 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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[]
返回
新的异步文件通道
- 属性
注解
本页的某些部分是根据 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[]
指定文件打开方式的选项
返回
新的异步文件通道
- 属性
注解
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。