Matcher class
Searches the file system for files with names that match specified patterns.
Supports both include and exclude glob patterns for flexible file matching.
- Available extensions
Constructors
- Matcher()
Properties
-
excludePatterns
→ List<
String> -
Gets the list of exclude patterns.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
includePatterns
→ List<
String> -
Gets the list of include patterns.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addExclude(
String pattern) → Matcher - Adds a glob pattern to exclude files from the search results.
-
addExcludePatterns(
Iterable< Iterable< patterns) → MatcherString> > -
Available on Matcher, provided by the MatcherExtensions extension
Adds multiple exclude patterns to the matcher. -
addInclude(
String pattern) → Matcher - Adds a glob pattern to include files in the search results.
-
addIncludePatterns(
Iterable< Iterable< patterns) → MatcherString> > -
Available on Matcher, provided by the MatcherExtensions extension
Adds multiple include patterns to the matcher. -
execute(
DirectoryInfoBase directoryInfo) → PatternMatchingResult - Executes the matcher against the specified directory.
-
getResultsInFullPath(
String directoryPath) → Iterable< String> -
Available on Matcher, provided by the MatcherExtensions extension
Searches the directory for all files matching patterns and returns their full paths. -
matchFile(
String file, [String? root]) → PatternMatchingResult -
Available on Matcher, provided by the MatcherExtensions extension
Matches a single file path without accessing the file system. -
matchFiles(
Iterable< String> files, [String? root]) → PatternMatchingResult -
Available on Matcher, provided by the MatcherExtensions extension
Matches multiple file paths without accessing the file system. -
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