code: func treeCanMatchPattern(pattern string) func(name string) bool {
  	wildCard := false
  	if i := strings.Index(pattern, "..."); i >= 0 {
  		wildCard = true
  		pattern = pattern[:i]
  	}
  	return func(name string) bool {
  		return len(name) <= len(pattern) && hasPathPrefix(pattern, name) ||
  			wildCard && strings.HasPrefix(name, pattern)
  	}
  }
docs: // treeCanMatchPattern(pattern)(name) reports whether
  // name or children of name can possibly match pattern.
  // Pattern is the same limited glob accepted by matchPattern.