()
| 28 | assert(!this.files.length); |
| 29 | } |
| 30 | async watchFiles() { |
| 31 | const watcher = watch(this.dirPath); |
| 32 | for await (const evt of watcher) { |
| 33 | const idx = this.files.indexOf(evt.filename); |
| 34 | if (idx < 0) continue; |
| 35 | this.files.splice(idx, 1); |
| 36 | await setTimeout(common.platformTimeout(100)); |
| 37 | if (!this.files.length) break; |
| 38 | } |
| 39 | } |
| 40 | async writeFiles() { |
| 41 | if (common.isMacOS) { |
| 42 | // Do the write with a delay to ensure that the OS is ready to notify us. |
no test coverage detected