2026/4/18小於 1 分鐘
watchContentChanges
監視檔案內容的變化。
語法
watchContentChanges(path: string, threshold: number): void參數
| 參數名稱 | 類型 | 說明 |
|---|---|---|
path | string | 要修改的檔案路徑 |
threshold | number | 內容變化閾值 |
// 這將監視 file.txt 的內容變化,當變化超過閾值時觸發事件
FilesJS.watchContentChanges('file.txt', 10);