Skip to content

Commit b571b2c

Browse files
authored
Clarify the behavior of FilePatternMatch Path and Stem (dotnet#5348)
Related: dotnet/runtime#36092 (issue) and dotnet/runtime#48093 (PR)
1 parent 3d68667 commit b571b2c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

xml/Microsoft.Extensions.FileSystemGlobbing/FilePatternMatch.xml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
<Parameter Name="stem" Type="System.String" />
5454
</Parameters>
5555
<Docs>
56-
<param name="path">The path to the matched file</param>
57-
<param name="stem">The stem</param>
56+
<param name="path">The path to the file matched, relative to the beginning of the matching search pattern.</param>
57+
<param name="stem">The subpath to the file matched, relative to the first wildcard in the matching search pattern.</param>
5858
<summary>Initializes new instance of <see cref="T:Microsoft.Extensions.FileSystemGlobbing.FilePatternMatch" /></summary>
5959
<remarks>To be added.</remarks>
6060
</Docs>
@@ -180,10 +180,10 @@
180180
<ReturnType>System.String</ReturnType>
181181
</ReturnValue>
182182
<Docs>
183-
<summary>The path to the file matched.</summary>
183+
<summary>The path to the file matched, relative to the beginning of the matching search pattern.</summary>
184184
<value>To be added.</value>
185-
<remarks>If the matcher searched for "**/*.cs" using "src/Project" as the directory base and the pattern matcher found
186-
"src/Project/Interfaces/IFile.cs", then Stem = "Interfaces/IFile.cs" and Path = "src/Project/Interfaces/IFile.cs".</remarks>
185+
<remarks>If the matcher searched for "src/Project/**/*.cs" and the pattern matcher found "src/Project/Interfaces/IFile.cs",
186+
then <see cref="Stem" /> = "Interfaces/IFile.cs" and <see cref="Path" /> = "src/Project/Interfaces/IFile.cs".</remarks>
187187
</Docs>
188188
</Member>
189189
<Member MemberName="Stem">
@@ -209,11 +209,10 @@
209209
<ReturnType>System.String</ReturnType>
210210
</ReturnValue>
211211
<Docs>
212-
<summary>The subpath to the matched file under the base directory searched.</summary>
212+
<summary>The subpath to the file matched, relative to the first wildcard in the matching search pattern.</summary>
213213
<value>To be added.</value>
214-
<remarks>If the matcher searched for "**/*.cs" using "src/Project" as the directory base and the pattern matcher found
215-
"src/Project/Interfaces/IFile.cs",
216-
then Stem = "Interfaces/IFile.cs" and Path = "src/Project/Interfaces/IFile.cs".</remarks>
214+
<remarks>If the matcher searched for "src/Project/**/*.cs" and the pattern matcher found "src/Project/Interfaces/IFile.cs",
215+
then <see cref="Stem" /> = "Interfaces/IFile.cs" and <see cref="Path" /> = "src/Project/Interfaces/IFile.cs".</remarks>
217216
</Docs>
218217
</Member>
219218
</Members>

0 commit comments

Comments
 (0)