(kind: VaultChangeKind)
| 108 | // surface it explicitly — otherwise another client sharing this vault |
| 109 | // (e.g. the web app) wouldn't see the folder until a manual refresh. |
| 110 | const dirHandler = (kind: VaultChangeKind) => (absPath: string) => { |
| 111 | if (!this.root) return |
| 112 | if (path.basename(absPath).startsWith('.')) return |
| 113 | const rel = toPosix(path.relative(this.root, absPath)) |
| 114 | const folder = folderForRelativePath(rel) |
| 115 | if (!folder) return |
| 116 | onEvent({ kind, path: rel, folder, scope: 'folder' }) |
| 117 | } |
| 118 | |
| 119 | this.watcher |
| 120 | .on('add', handler('add')) |
nothing calls this directly
no test coverage detected