MCPcopy Index your code
hub / github.com/php/frankenphp / allowReload

Method allowReload

internal/watcher/pattern.go:84–93  ·  view source on GitHub ↗
(event *watcher.Event)

Source from the content-addressed store, hash-verified

82}
83
84func (p *pattern) allowReload(event *watcher.Event) bool {
85 if !isValidEventType(event.EffectType) || !isValidPathType(event) {
86 return false
87 }
88
89 // some editors create temporary files and never actually modify the original file
90 // so we need to also check Event.AssociatedPathName
91 // see https://github.com/php/frankenphp/issues/1375
92 return p.isValidPattern(event.PathName) || p.isValidPattern(event.AssociatedPathName)
93}
94
95func (p *pattern) handle(event *watcher.Event) {
96 // If the watcher prematurely sends the die@ event, retry watching

Callers 5

handleMethod · 0.95
assertPatternMatchFunction · 0.80
assertPatternNotMatchFunction · 0.80

Calls 3

isValidPatternMethod · 0.95
isValidEventTypeFunction · 0.85
isValidPathTypeFunction · 0.85

Tested by 4

assertPatternMatchFunction · 0.64
assertPatternNotMatchFunction · 0.64