RobotsRule Class
Represents a single Allow or Disallow directive in a robots.txt file.
public sealed class RobotsRuleRemarks
Path patterns support Google's wildcard extensions:
*matches any sequence of characters (zero or more).$at the end of the pattern anchors the match to the end of the path.
Constructors
| Name | Description |
|---|---|
| RobotsRule(RobotsRuleKind, string) |
RobotsRule(RobotsRuleKind, string)
RobotsRule.cspublic RobotsRule(RobotsRuleKind kind, string value)Parameters
kindRobotsRuleKindvaluestring
No documentation is available.
Properties
| Name | Description |
|---|---|
| Kind | Gets whether this rule allows or disallows access. |
| Value | Gets the raw path pattern as it appears in the robots.txt file. |
Kind
RobotsRule.csValue
RobotsRule.csMethods
| Name | Description |
|---|---|
| Matches(ReadOnlySpan<char>) | Determines whether the given path matches this rule's pattern, using Google's wildcard semantics (* and $). |
| Matches(string) | Determines whether the given path matches this rule's pattern, using Google's wildcard semantics (* and $). |
| ToString() | Returns a string that represents the current object. |
Matches overloads
Matches(ReadOnlySpan<char>)
RobotsRule.csDetermines whether the given path matches this rule's pattern, using Google's wildcard semantics (* and $).
public bool Matches(ReadOnlySpan<char> path)