MCPcopy
hub / github.com/syncthing/syncthing / checkPrefixMatch

Function checkPrefixMatch

lib/api/api.go:1680–1690  ·  view source on GitHub ↗
(s, prefix string)

Source from the content-addressed store, hash-verified

1678)
1679
1680func checkPrefixMatch(s, prefix string) int {
1681 if strings.HasPrefix(s, prefix) {
1682 return matchExact
1683 }
1684
1685 if strings.HasPrefix(strings.ToLower(s), strings.ToLower(prefix)) {
1686 return matchCaseIns
1687 }
1688
1689 return noMatch
1690}
1691
1692func browseRoots(fsType fs.FilesystemType) []string {
1693 filesystem := fs.NewFilesystem(fsType, "")

Callers 2

browseFilesFunction · 0.85
TestPrefixMatchFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestPrefixMatchFunction · 0.68