import "v.io/v23/glob"
Package glob defines a globbing syntax and implements matching routines.
Globs match a slash separated series of glob expressions.
// Patterns: term ['/' term]* term: '*' matches any sequence of non-Separator characters '?' matches any single non-Separator character '[' [ '^' ] { character-range } ']' // Character classes (must be non-empty): c matches character c (c != '*', '?', '\\', '[', '/') '\\' c matches character c // Character-ranges: c matches character c (c != '\\', '-', ']') '\\' c matches character c lo '-' hi matches character c for lo <= c <= hi
type Element struct {
// contains filtered or unexported fields
}
Element represents a single element of a glob pattern.
FixedPrefix returns the unescaped fixed part of the pattern, and whether the prefix is the whole pattern. The fixed part does not contain any wildcards.
Match returns true iff this pattern element matches the given segment.
type Glob struct {
// contains filtered or unexported fields
}
Glob represents a slash separated path glob pattern.
Parse returns a new Glob.
Empty returns true if the pattern cannot match anything.
Head returns an Element for the first element of the glob pattern.
Len returns the number of path elements represented by the glob expression.
Recursive returns true if the pattern is recursive.
Restricted returns true if recursion is restricted (up to the caller to know what that means).
SplitFixedElements returns the part of the glob pattern that contains only fixed elements, and the glob that follows it.
String returns the string representation of the glob pattern.
Tail returns the suffix of g starting at the second element.
Package glob imports 2 packages (graph) and is imported by 44 packages. Updated 2020-06-08. Refresh now. Tools for package owners.