IGlobEvaluatable Interface
Represents an object that can evaluate glob patterns against file system paths.
public interface IGlobEvaluatableProperties
| Name | Description |
|---|---|
| CanMatchDirectories | Gets a value indicating whether this glob pattern can match directories. |
| CanMatchFiles | Gets a value indicating whether this glob pattern can match files. |
| Mode | Gets the glob mode indicating whether this pattern includes or excludes matches. |
| TraverseDirectories | Gets a value indicating whether directories should be traversed when enumerating files. |
CanMatchDirectories
CanMatchFiles
Mode
TraverseDirectories
Methods
| Name | Description |
|---|---|
| IsMatch(ReadOnlySpan<char>, ReadOnlySpan<char>, PathItemType?) | Determines whether the specified path matches the glob pattern. |
| IsPartialMatch(ReadOnlySpan<char>, ReadOnlySpan<char>) | Determines whether a directory should be recursed into when enumerating files. |
IsMatch(ReadOnlySpan<char>, ReadOnlySpan<char>, PathItemType?)
Determines whether the specified path matches the glob pattern.
bool IsMatch(ReadOnlySpan<char> directory, ReadOnlySpan<char> filename, PathItemType? itemType)Parameters
directoryReadOnlySpan<char>- The directory part of the path to match.
filenameReadOnlySpan<char>- The filename part of the path to match.
itemTypePathItemType?- The type of the path item (file or directory), or
nullif unknown.
Returns
bool true if the path matches the pattern; otherwise, false.
IsPartialMatch(ReadOnlySpan<char>, ReadOnlySpan<char>)
Determines whether a directory should be recursed into when enumerating files.
bool IsPartialMatch(ReadOnlySpan<char> folderPath, ReadOnlySpan<char> filename)Parameters
folderPathReadOnlySpan<char>- The folder path to check.
filenameReadOnlySpan<char>- The filename part of the path to check.
Returns
bool true if the directory could contain matches; otherwise, false.