Files.Write 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Write(IPath, IIterable, IOpenOption[]) |
寫一行文字到檔案。 |
| Write(IPath, Byte[], IOpenOption[]) |
寫一行文字到檔案。 |
| Write(IPath, IIterable, Charset, IOpenOption[]) |
寫一行文字到檔案。 |
Write(IPath, IIterable, IOpenOption[])
寫一行文字到檔案。
[Android.Runtime.Register("write", "(Ljava/nio/file/Path;Ljava/lang/Iterable;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? Write(Java.Nio.FileNio.IPath? path, Java.Lang.IIterable? lines, params Java.Nio.FileNio.IOpenOption[]? options);
[<Android.Runtime.Register("write", "(Ljava/nio/file/Path;Ljava/lang/Iterable;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member Write : Java.Nio.FileNio.IPath * Java.Lang.IIterable * Java.Nio.FileNio.IOpenOption[] -> Java.Nio.FileNio.IPath
參數
- path
- IPath
檔案路徑
- lines
- IIterable
一個用來遍歷 char 序列的物件
- options
- IOpenOption[]
指定檔案開啟方式的選項
傳回
路徑
- 屬性
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
Write(IPath, Byte[], IOpenOption[])
寫一行文字到檔案。
[Android.Runtime.Register("write", "(Ljava/nio/file/Path;[B[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? Write(Java.Nio.FileNio.IPath? path, byte[]? bytes, params Java.Nio.FileNio.IOpenOption[]? options);
[<Android.Runtime.Register("write", "(Ljava/nio/file/Path;[B[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member Write : Java.Nio.FileNio.IPath * byte[] * Java.Nio.FileNio.IOpenOption[] -> Java.Nio.FileNio.IPath
參數
- path
- IPath
檔案路徑
- bytes
- Byte[]
包含要寫入的位元組陣列
- options
- IOpenOption[]
指定檔案開啟方式的選項
傳回
路徑
- 屬性
備註
Java 參考 java.nio.file.Files.write。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
Write(IPath, IIterable, Charset, IOpenOption[])
寫一行文字到檔案。
[Android.Runtime.Register("write", "(Ljava/nio/file/Path;Ljava/lang/Iterable;Ljava/nio/charset/Charset;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? Write(Java.Nio.FileNio.IPath? path, Java.Lang.IIterable? lines, Java.Nio.Charset.Charset? cs, params Java.Nio.FileNio.IOpenOption[]? options);
[<Android.Runtime.Register("write", "(Ljava/nio/file/Path;Ljava/lang/Iterable;Ljava/nio/charset/Charset;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member Write : Java.Nio.FileNio.IPath * Java.Lang.IIterable * Java.Nio.Charset.Charset * Java.Nio.FileNio.IOpenOption[] -> Java.Nio.FileNio.IPath
參數
- path
- IPath
檔案路徑
- lines
- IIterable
一個用來遍歷 char 序列的物件
- cs
- Charset
用於編碼的字元集
- options
- IOpenOption[]
指定檔案開啟方式的選項
傳回
路徑
- 屬性
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。