MCPcopy Index your code
hub / github.com/codeaashu/claude-code / startWatching

Function startWatching

src/utils/hooks/fileChangedWatcher.ts:67–78  ·  view source on GitHub ↗
(paths: string[])

Source from the content-addressed store, hash-verified

65}
66
67function startWatching(paths: string[]): void {
68 logForDebugging(`FileChanged: watching ${paths.length} paths`)
69 watcher = chokidar.watch(paths, {
70 persistent: true,
71 ignoreInitial: true,
72 awaitWriteFinish: { stabilityThreshold: 500, pollInterval: 200 },
73 ignorePermissionErrors: true,
74 })
75 watcher.on('change', p => handleFileEvent(p, 'change'))
76 watcher.on('add', p => handleFileEvent(p, 'add'))
77 watcher.on('unlink', p => handleFileEvent(p, 'unlink'))
78}
79
80function handleFileEvent(
81 path: string,

Callers 2

restartWatchingFunction · 0.85

Calls 4

logForDebuggingFunction · 0.85
handleFileEventFunction · 0.85
watchMethod · 0.80
onMethod · 0.80

Tested by

no test coverage detected