IgnorePattern class
A single gitignore-style pattern with metadata.
Handles:
- Directory patterns (trailing
/) - Path-based patterns (containing
/) - Simple name patterns
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPathSeparator → bool
-
Whether this pattern contains a path separator (requires path matching).
final
- isDirectoryOnly → bool
-
Whether this pattern is for directories only (originally ended with
/).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
matches(
String relativePath, {required bool isDirectory}) → bool - Checks if this pattern matches the given path.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
parse(
String pattern) → IgnorePattern? - Parses a gitignore-style pattern.