MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / Close

Method Close

apps/server/internal/watcher/watcher.go:131–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129}
130
131func (w *Watcher) Close() {
132 w.mu.Lock()
133 if w.closed {
134 w.mu.Unlock()
135 return
136 }
137 w.closed = true
138 close(w.stopCh)
139 for ch := range w.subs {
140 delete(w.subs, ch)
141 close(ch)
142 }
143 w.mu.Unlock()
144 if w.fs != nil {
145 _ = w.fs.Close()
146 }
147}
148
149func (w *Watcher) loop() {
150 // A disabled (no-op) watcher has no fsnotify handle — just block until close.

Callers 15

newTestWatcherFunction · 0.95
ImportAssetMethod · 0.80
copyFileFunction · 0.80
switchVaultRootMethod · 0.80
uploadAssetMethod · 0.80
watchWSMethod · 0.80
serveStaticMethod · 0.80
serveIndexHTMLMethod · 0.80
TestBasePathHealthzFunction · 0.80

Calls 1

closeFunction · 0.50