2026/4/18小於 1 分鐘
createFiles
建立檔案。
語法
createFile(path: string, content: string): void參數
| 參數名稱 | 類型 | 說明 |
|---|---|---|
path | string | 要建立的檔案路徑 |
content | string | 檔案的內容 |
// 這將在當前目錄下建立一個名為 "file.txt" 的檔案,內容為 "Hello, World!"
FilesJS.createFile('file.txt', 'Hello, World!');