Lines Matching refs:pattern
92 func Glob(pattern string, excludes []string, follow ShouldFollowSymlinks) (GlobResult, error) {
93 return startGlob(OsFs, pattern, excludes, follow)
96 func startGlob(fs FileSystem, pattern string, excludes []string,
99 if filepath.Base(pattern) == "**" {
103 matches, deps, err := glob(fs, pattern, false, follow)
123 if !isWild(pattern) {
144 Pattern: pattern,
153 func glob(fs FileSystem, pattern string, hasRecursive bool,
156 if !isWild(pattern) {
159 pattern = filepath.Clean(pattern)
160 matches, err = fs.glob(pattern)
170 pattern = filepath.Dir(pattern)
171 matchDirs, err = fs.glob(pattern)
181 dir, file := saneSplit(pattern)
251 func isWild(pattern string) bool {
252 return strings.ContainsAny(pattern, "*?[")
297 func Match(pattern, name string) (bool, error) { argument
298 if filepath.Base(pattern) == "**" {
302 patternDir := pattern[len(pattern)-1] == '/'
311 pattern = pattern[:len(pattern)-1]
316 pattern, patternFile = filepath.Dir(pattern), filepath.Base(pattern)
319 if strings.Contains(pattern, "**") {
325 return name == pattern, nil
327 if match, err := filepath.Match(pattern, name); err != nil {
356 func IsGlob(pattern string) bool {
357 return strings.IndexAny(pattern, "*?[") >= 0