Remove unused GlobPatternList function am: 850d3886d4 am: 0bb9608b51

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1668806

Change-Id: I9d7435100757e0e8838cde9512ff25cda0a6976b
This commit is contained in:
Colin Cross 2021-04-09 17:49:02 +00:00 committed by Automerger Merge Worker
commit bc184384fe

View file

@ -298,30 +298,6 @@ func Match(pattern, name string) (bool, error) {
}
}
func GlobPatternList(patterns []string, prefix string) (globedList []string, depDirs []string, err error) {
var (
matches []string
deps []string
)
globedList = make([]string, 0)
depDirs = make([]string, 0)
for _, pattern := range patterns {
if isWild(pattern) {
matches, deps, err = Glob(filepath.Join(prefix, pattern), nil, FollowSymlinks)
if err != nil {
return nil, nil, err
}
globedList = append(globedList, matches...)
depDirs = append(depDirs, deps...)
} else {
globedList = append(globedList, filepath.Join(prefix, pattern))
}
}
return globedList, depDirs, nil
}
// IsGlob returns true if the pattern contains any glob characters (*, ?, or [).
func IsGlob(pattern string) bool {
return strings.IndexAny(pattern, "*?[") >= 0