From 989ee7abf24692b8d3b91427e0b75c2431ee9067 Mon Sep 17 00:00:00 2001 From: Robert Mongold Date: Fri, 27 Mar 2026 01:16:44 -0400 Subject: [PATCH 1/5] Clarify MatchCasing does not affect directory path resolution --- .../src/System/IO/EnumerationOptions.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs index b80fd200532f85..14cb734bbeb19a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs @@ -73,10 +73,15 @@ internal static EnumerationOptions FromSearchOption(SearchOption searchOption) /// The default is simple matching where '*' is always 0 or more characters and '?' is a single character. public MatchType MatchType { get; set; } - /// Gets or sets the case matching behavior. - /// One of the enumeration values that indicates the case matching behavior. - /// For APIs that allow specifying a match expression, this property allows you to specify the case matching behavior. - /// The default is to match platform defaults, which are gleaned from the case sensitivity of the temporary folder. + /// + /// Gets or sets the case matching behavior for file name pattern matching. + /// + /// + /// This property affects only how file names are matched against the search pattern. + /// It does not affect directory path resolution. On case-sensitive file systems + /// (such as Linux and macOS), directory paths must match the exact casing regardless of this setting. + /// The default is to match the platform defaults. + /// public MatchCasing MatchCasing { get; set; } /// Gets or sets a value that indicates the maximum directory depth to recurse while enumerating, when is set to . From 67a5f4ef86cdf225f05641ac8a2752b340d25658 Mon Sep 17 00:00:00 2001 From: Robert Mongold Date: Fri, 27 Mar 2026 01:20:48 -0400 Subject: [PATCH 2/5] Fix XML documentation formatting in EnumerationOptions --- .../System.Private.CoreLib/src/System/IO/EnumerationOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs index 14cb734bbeb19a..ae1ea0d63e33b7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs @@ -73,7 +73,7 @@ internal static EnumerationOptions FromSearchOption(SearchOption searchOption) /// The default is simple matching where '*' is always 0 or more characters and '?' is a single character. public MatchType MatchType { get; set; } - /// + /// /// Gets or sets the case matching behavior for file name pattern matching. /// /// From a1320c30a04f091b063e3a94399149b7a90123a3 Mon Sep 17 00:00:00 2001 From: Robert Mongold Date: Fri, 27 Mar 2026 09:02:56 -0400 Subject: [PATCH 3/5] Fix XML comments formatting in EnumerationOptions.cs --- .../System.Private.CoreLib/src/System/IO/EnumerationOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs index ae1ea0d63e33b7..54508343d83fab 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs @@ -73,7 +73,7 @@ internal static EnumerationOptions FromSearchOption(SearchOption searchOption) /// The default is simple matching where '*' is always 0 or more characters and '?' is a single character. public MatchType MatchType { get; set; } - /// + /// /// Gets or sets the case matching behavior for file name pattern matching. /// /// From 5f3c1318e472c84f3494248f47214ab5f746e7a7 Mon Sep 17 00:00:00 2001 From: Robert Mongold Date: Fri, 27 Mar 2026 22:46:05 -0400 Subject: [PATCH 4/5] Update src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/System/IO/EnumerationOptions.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs index 54508343d83fab..211127fabd31d8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs @@ -79,8 +79,9 @@ internal static EnumerationOptions FromSearchOption(SearchOption searchOption) /// /// This property affects only how file names are matched against the search pattern. /// It does not affect directory path resolution. On case-sensitive file systems - /// (such as Linux and macOS), directory paths must match the exact casing regardless of this setting. - /// The default is to match the platform defaults. + /// (common on Linux or when using a case-sensitive volume), directory paths must match the exact casing + /// regardless of this setting; on case-insensitive file systems, path resolution follows the behavior + /// of the underlying file system. The default is to match the platform defaults. /// public MatchCasing MatchCasing { get; set; } From c12ba5d84576edf80489904712a16bdc60e34e9d Mon Sep 17 00:00:00 2001 From: Robert Mongold Date: Fri, 27 Mar 2026 22:46:40 -0400 Subject: [PATCH 5/5] Update src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/System/IO/EnumerationOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs index 211127fabd31d8..54791e342a8827 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/EnumerationOptions.cs @@ -74,11 +74,11 @@ internal static EnumerationOptions FromSearchOption(SearchOption searchOption) public MatchType MatchType { get; set; } /// - /// Gets or sets the case matching behavior for file name pattern matching. + /// Gets or sets the case matching behavior for entry (file and directory) name matching against the search pattern. /// /// - /// This property affects only how file names are matched against the search pattern. - /// It does not affect directory path resolution. On case-sensitive file systems + /// This property affects only how entry names (file and directory names) are matched against the search pattern during enumeration. + /// It does not affect directory path resolution or traversal. On case-sensitive file systems /// (common on Linux or when using a case-sensitive volume), directory paths must match the exact casing /// regardless of this setting; on case-insensitive file systems, path resolution follows the behavior /// of the underlying file system. The default is to match the platform defaults.