MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / commentsNotePath

Method commentsNotePath

apps/server/internal/watcher/watcher.go:185–191  ·  view source on GitHub ↗
(absPath string)

Source from the content-addressed store, hash-verified

183}
184
185func (w *Watcher) commentsNotePath(absPath string) (string, bool) {
186 rel := w.relativePath(absPath)
187 if !strings.HasPrefix(rel, noteCommentsPrefix) || !strings.HasSuffix(rel, noteCommentsSuffix) {
188 return "", false
189 }
190 return strings.TrimSuffix(strings.TrimPrefix(rel, noteCommentsPrefix), noteCommentsSuffix), true
191}
192
193func (w *Watcher) handle(ev fsnotify.Event) {
194 base := filepath.Base(ev.Name)

Callers 1

handleMethod · 0.95

Calls 1

relativePathMethod · 0.95

Tested by

no test coverage detected