MCPcopy
hub / github.com/docker/compose / shouldNotify

Method shouldNotify

pkg/watch/watcher_naive.go:221–235  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

219}
220
221func (d *naiveNotify) shouldNotify(path string) bool {
222 if _, ok := d.notifyList[path]; ok {
223 // We generally don't care when directories change at the root of an ADD
224 stat, err := os.Lstat(path)
225 isDir := err == nil && stat.IsDir()
226 return !isDir
227 }
228
229 for root := range d.notifyList {
230 if pathutil.IsChild(root, path) {
231 return true
232 }
233 }
234 return false
235}
236
237func (d *naiveNotify) shouldSkipDir(path string) bool {
238 // If path is directly in the notifyList, we should always watch it.

Callers 1

loopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected