<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="11.0.0-preview.5.26302.115" />

Microsoft.Extensions.FileSystemGlobbing.Matcher

public class Matcher
Searches the file system for files with names that match specified patterns.
public Matcher()

Initializes an instance of Matcher using case-insensitive matching.

public Matcher(StringComparison comparisonType)

Initializes an instance of Matcher using the specified string comparison method.

public Matcher(StringComparison comparisonType = 5, bool preserveFilterOrder = false)

public virtual Matcher AddExclude(string pattern)

Add a file name pattern for files the matcher should exclude from the results. Patterns are relative to the root directory given when Execute is called.

Use the forward slash '/' to represent directory separator. Use '*' to represent wildcards in file and directory names. Use '**' to represent arbitrary directory depth. Use '..' to represent a parent directory.

public virtual Matcher AddInclude(string pattern)

Add a file name pattern that the matcher should use to discover files. Patterns are relative to the root directory given when Execute is called.

Use the forward slash '/' to represent directory separator. Use '*' to represent wildcards in file and directory names. Use '**' to represent arbitrary directory depth. Use '..' to represent a parent directory.

public virtual PatternMatchingResult Execute(DirectoryInfoBase directoryInfo)

Searches the directory specified for all files matching patterns added to this instance of Matcher.