EmptyRangeBehavior
How empty ranges ([]
) are treated
enum EmptyRangeBehavior
How empty ranges ([]
) are treated
enum EmptyRangeBehavior
import Glob
struct Options
Options to control how patterns are parsed and matched
struct Pattern
A glob pattern that can be matched against string content.
case allow
Treat an empty range as matching nothing, equivalent to nothing at all
case error
Throw an error when an empty range is used
case treatClosingBracketAsCharacter
When a range starts with a closing range character, treat the closing bracket as a character and continue the range
static let `default`: Self
Default options for parsing and matching patterns.
static let go: Self
Attempts to match the behavior of filepath.Match
in go.
static func posix() -> Pattern.Options
Attempts to match the behavior of POSIX glob.
var emptyRangeBehavior: EmptyRangeBehavior
How are empty ranges handled.
var matchLeadingDirectories: Bool
If a pattern should match if it matches a parent directory, as defined by pathSeparator
.
var pathSeparator: Character?
The path separator to use in matching
var rangeNegationCharacter: RangeNegationCharacter
The character used to specify when a range matches characters that aren’t in the range.
var requiresExplicitLeadingPeriods: Bool
If a period in the name is at the beginning of a component, don’t match using wildcards.
var supportsEscapedCharacters: Bool
If the pattern supports escaping control characters with ’'
var supportsPathLevelWildcards: Bool
If a double star/asterisk causes the pattern to match path separators.
var supportsPatternLists: Bool
Recognize beside the normal patterns also the extended patterns introduced in ksh
. Equivalent to FNM_EXTMATCH
.
var supportsRangeSeparatorAtBeginningAndEnd: Bool
Allows the -
character to be included in a character class if it is the first or last character (ie [-abc]
or [abc-]
)
enum RangeNegationCharacter
The character used to invert a character class.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.