2026/4/18小於 1 分鐘
appendLine
追加新一行文字至文件末端
語法
appendLine(path: string, content: string): void參數
| 參數名稱 | 類型 | 說明 |
|---|---|---|
path | string | 要寫入的檔案路徑 |
content | string | 要寫入的內容 |
// 這將把 "這是要追加的內容。" 追加到 example.txt 的末尾,並確保它在新的一行
FilesJS.appendLine('example.txt', '這是要追加的內容。\n');