FileChannel.Open 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Open(IPath, IOpenOption[]) |
開啟或建立檔案,回傳檔案通道以存取該檔案。 |
| Open(IPath, ICollection<IOpenOption>, IFileAttribute[]) |
開啟或建立檔案,回傳檔案通道以存取該檔案。 |
Open(IPath, IOpenOption[])
開啟或建立檔案,回傳檔案通道以存取該檔案。
[Android.Runtime.Register("open", "(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/FileChannel;", "", ApiSince=26)]
public static Java.Nio.Channels.FileChannel? Open(Java.Nio.FileNio.IPath? path, params Java.Nio.FileNio.IOpenOption[]? options);
[<Android.Runtime.Register("open", "(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/FileChannel;", "", ApiSince=26)>]
static member Open : Java.Nio.FileNio.IPath * Java.Nio.FileNio.IOpenOption[] -> Java.Nio.Channels.FileChannel
參數
- path
- IPath
檔案開啟或建立的路徑
- options
- IOpenOption[]
指定檔案開啟方式的選項
傳回
一個新的檔案通道
- 屬性
備註
Java 文件 java.nio.channels.FileChannel.open(java.nio.file.Path, java.nio.file.OpenOption)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
Open(IPath, ICollection<IOpenOption>, IFileAttribute[])
開啟或建立檔案,回傳檔案通道以存取該檔案。
[Android.Runtime.Register("open", "(Ljava/nio/file/Path;Ljava/util/Set;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/FileChannel;", "", ApiSince=26)]
public static Java.Nio.Channels.FileChannel? Open(Java.Nio.FileNio.IPath? path, System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption>? options, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("open", "(Ljava/nio/file/Path;Ljava/util/Set;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/FileChannel;", "", ApiSince=26)>]
static member Open : Java.Nio.FileNio.IPath * System.Collections.Generic.ICollection<Java.Nio.FileNio.IOpenOption> * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.Channels.FileChannel
參數
- path
- IPath
檔案開啟或建立的路徑
- options
- ICollection<IOpenOption>
指定檔案開啟方式的選項
- attrs
- IFileAttribute[]
建立檔案時可選擇的檔案屬性清單,原子式設定
傳回
一個新的檔案通道
- 屬性
備註
Java 文件 java.nio.channels.FileChannel.open(java.nio.file.Path, java.nio.file.OpenOption)。
Java 參考 java.nio.channels.FileChannel.open。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。