- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for QuoteGlob (0.21 sec)
-
src/cmd/go/internal/str/path.go
if s == "" || os.IsPathSeparator(s[len(s)-1]) { return s } return s + string(filepath.Separator) } // QuoteGlob returns s with all Glob metacharacters quoted. // We don't try to handle backslash here, as that can appear in a // file path on Windows. func QuoteGlob(s string) string { if !strings.ContainsAny(s, `*?[]`) { return s } var sb strings.Builder for _, c := range s { switch c {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 31 20:33:02 UTC 2023 - 3.9K bytes - Viewed (0) -
src/cmd/go/internal/modfetch/fetch.go
// active. parentDir := filepath.Dir(dir) tmpPrefix := filepath.Base(dir) + ".tmp-" if old, err := filepath.Glob(filepath.Join(str.QuoteGlob(parentDir), str.QuoteGlob(tmpPrefix)+"*")); err == nil { for _, path := range old { RemoveAll(path) // best effort } } if dirExists { if err := RemoveAll(dir); err != nil { return "", err } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 14:56:56 UTC 2024 - 30.3K bytes - Viewed (0) -
src/cmd/go/internal/clean/clean.go
// and not something that we want to remove. Also, we'd like to preserve // the access log for future analysis, even if the cache is cleared. subdirs, _ := filepath.Glob(filepath.Join(str.QuoteGlob(dir), "[0-9a-f][0-9a-f]")) printedErrors := false if len(subdirs) > 0 { if err := sh.RemoveAll(subdirs...); err != nil && !printedErrors { printedErrors = true base.Error(err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 10.3K bytes - Viewed (0) -
src/cmd/go/internal/load/pkg.go
if _, err := pathpkg.Match(glob, ""); err != nil || !validEmbedPattern(glob) { return nil, nil, fmt.Errorf("invalid pattern syntax") } // Glob to find matches. match, err := fsys.Glob(str.QuoteGlob(str.WithFilePathSeparator(pkgdir)) + filepath.FromSlash(glob)) if err != nil { return nil, nil, err } // Filter list of matches down to the ones that will still exist when
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 28 17:00:51 UTC 2024 - 120K bytes - Viewed (0)