(path)
| 86 | } |
| 87 | |
| 88 | function maybeAddDirectory(path) { |
| 89 | try { |
| 90 | const stats = statSync(path); |
| 91 | if (stats.isDirectory()) addDirectory(path); |
| 92 | } catch { |
| 93 | // The file may have been deleted between the watch event and stat call. |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | addDirectory(root); |
| 98 | return watchers; |
no test coverage detected