Skip to main content

Module WatchFile

Expand description

watch_file gRPC endpoint - Cocoon calls this when an extension uses vscode.workspace.createFileSystemWatcher. Routes to Mountain’s FileWatcherProvider::RegisterWatcher so OS events (FSEvents on macOS, inotify on Linux) flow back to Cocoon as $fileWatcher:event gRPC notifications which Cocoon fans out to extension onDidChangeFile listeners.

The proto WatchFileRequest only carries a uri field. We derive the watch handle from a hash of the URI so dedup-by-triple logic in FileWatcherProvider can collapse identical registrations from multiple extensions watching the same root.

Statics§

WATCH_SEQ 🔒

Functions§

Fn