MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / isValidSubSettingsFileName

Function isValidSubSettingsFileName

pkg/wconfig/filewatcher.go:161–167  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

159var validFileRe = regexp.MustCompile(`^[a-zA-Z0-9_@.-]+\.json$`)
160
161func isValidSubSettingsFileName(fileName string) bool {
162 if filepath.Ext(fileName) != ".json" {
163 return false
164 }
165 baseName := filepath.Base(fileName)
166 return validFileRe.MatchString(baseName)
167}
168
169func (w *Watcher) handleSettingsFileEvent(_ fsnotify.Event, _ string) {
170 fullConfig := ReadFullConfig()

Callers 1

handleEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected