MCPcopy Create free account
hub / github.com/driangle/taskmd / addRecursive

Method addRecursive

apps/cli/internal/watcher/watcher.go:103–117  ·  view source on GitHub ↗
(fsw *fsnotify.Watcher, root string)

Source from the content-addressed store, hash-verified

101}
102
103func (w *Watcher) addRecursive(fsw *fsnotify.Watcher, root string) error {
104 return filepath.WalkDir(root, func(path string, d os.DirEntry, err error) error {
105 if err != nil {
106 return nil
107 }
108 if d.IsDir() {
109 name := d.Name()
110 if strings.HasPrefix(name, ".") || name == "node_modules" || name == "vendor" {
111 return filepath.SkipDir
112 }
113 return fsw.Add(path)
114 }
115 return nil
116 })
117}
118
119func isMarkdown(name string) bool {
120 return strings.HasSuffix(strings.ToLower(name), ".md")

Callers 1

StartMethod · 0.95

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected