語言

Files.Write 方法

定義

多載

名稱 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[]

指定檔案開啟方式的選項

傳回

路徑

屬性

備註

Java 文件 java.nio.file.Files.write(java.nio.file.Path, java.lang.Iterable, java.nio.charset.Charset, java.nio.file.OpenOption)。

本頁部分內容為基於 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(java.nio.file.Path, java.lang.Iterable, java.nio.charset.Charset, java.nio.file.OpenOption)。

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[]

指定檔案開啟方式的選項

傳回

路徑

屬性

備註

Java 文件 java.nio.file.Files.write(java.nio.file.Path, java.lang.Iterable, java.nio.charset.Charset, java.nio.file.OpenOption)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於