MCPcopy Create free account
hub / github.com/gokcehan/lf / matchPattern

Function matchPattern

nav.go:819–832  ·  view source on GitHub ↗
(pattern, name, path string)

Source from the content-addressed store, hash-verified

817}
818
819func matchPattern(pattern, name, path string) bool {
820 s := name
821
822 pattern = replaceTilde(pattern)
823
824 if filepath.IsAbs(pattern) {
825 s = filepath.Join(path, name)
826 }
827
828 // pattern errors are checked when 'hiddenfiles' option is set
829 matched, _ := filepath.Match(pattern, s)
830
831 return matched
832}
833
834func (nav *nav) preload() {
835 if !gOpts.preview || !gOpts.preload {

Callers 2

isHiddenFunction · 0.85
isHiddenFunction · 0.85

Calls 1

replaceTildeFunction · 0.85

Tested by

no test coverage detected