From de0a7654b7106f83630ea26d43af5dd2b602c5d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 10 Sep 2026 12:03:12 +0000 Subject: [PATCH 1/5] Initial plan From 240efd266e34e01e3b66bc9ccfaf4e1f36944998 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 10 Sep 2026 12:05:33 +0000 Subject: [PATCH 2/5] Fix FileStream bufferSize docs for FileOptions ctor Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> --- xml/System.IO/FileStream.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.IO/FileStream.xml b/xml/System.IO/FileStream.xml index e0da63c8c47..d8b1c51d81d 100644 --- a/xml/System.IO/FileStream.xml +++ b/xml/System.IO/FileStream.xml @@ -1218,7 +1218,7 @@ The file was too large (when One of the enumeration values that determines how to open or create the file. A bitwise combination of the enumeration values that determines how the file can be accessed by the object. This also determines the values returned by the and properties of the object. is if specifies a disk file. A bitwise combination of the enumeration values that determines how the file will be shared by processes. - A positive value greater than 0 indicating the buffer size. The default buffer size is 4096. + A non-negative value indicating the buffer size. A value of 0 disables buffering. The default buffer size is 4096. A bitwise combination of the enumeration values that specifies additional file options. Initializes a new instance of the class with the specified path, creation mode, read/write and sharing permission, the access other FileStreams can have to the same file, the buffer size, and additional file options. @@ -1258,7 +1258,7 @@ The file was too large (when refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. - is negative or zero. + is negative. -or- From cc63e7a14bf9ce5057fcbd9aabdc609fc45b831a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 10 Sep 2026 12:39:10 +0000 Subject: [PATCH 3/5] Clarify FileStream bufferSize=0 version behavior Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> --- xml/System.IO/FileStream.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xml/System.IO/FileStream.xml b/xml/System.IO/FileStream.xml index d8b1c51d81d..59f8d11b1db 100644 --- a/xml/System.IO/FileStream.xml +++ b/xml/System.IO/FileStream.xml @@ -1218,7 +1218,7 @@ The file was too large (when One of the enumeration values that determines how to open or create the file. A bitwise combination of the enumeration values that determines how the file can be accessed by the object. This also determines the values returned by the and properties of the object. is if specifies a disk file. A bitwise combination of the enumeration values that determines how the file will be shared by processes. - A non-negative value indicating the buffer size. A value of 0 disables buffering. The default buffer size is 4096. + A non-negative value indicating the buffer size. The default buffer size is 4096. In .NET 6 and later versions, a value of 0 disables buffering. A bitwise combination of the enumeration values that specifies additional file options. Initializes a new instance of the class with the specified path, creation mode, read/write and sharing permission, the access other FileStreams can have to the same file, the buffer size, and additional file options. @@ -1262,6 +1262,10 @@ The file was too large (when is zero in versions earlier than .NET 6. + + -or- + , , or contain an invalid value. The file cannot be found, such as when is or , and the file specified by does not exist. The file must already exist in these modes. An I/O error, such as specifying when the file specified by already exists, occurred. From 5abebd36ad191cd7e1d0eb3e1a685e160d832823 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 10 Sep 2026 12:52:10 +0000 Subject: [PATCH 4/5] Clarify bufferSize=1 disables FileStream buffering Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> --- xml/System.IO/FileStream.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.IO/FileStream.xml b/xml/System.IO/FileStream.xml index 59f8d11b1db..c03bd8c9f65 100644 --- a/xml/System.IO/FileStream.xml +++ b/xml/System.IO/FileStream.xml @@ -1218,7 +1218,7 @@ The file was too large (when One of the enumeration values that determines how to open or create the file. A bitwise combination of the enumeration values that determines how the file can be accessed by the object. This also determines the values returned by the and properties of the object. is if specifies a disk file. A bitwise combination of the enumeration values that determines how the file will be shared by processes. - A non-negative value indicating the buffer size. The default buffer size is 4096. In .NET 6 and later versions, a value of 0 disables buffering. + A non-negative value indicating the buffer size. The default buffer size is 4096. In .NET 6 and later versions, a value of 0 disables buffering (a value of 1 disables buffering in every version). A bitwise combination of the enumeration values that specifies additional file options. Initializes a new instance of the class with the specified path, creation mode, read/write and sharing permission, the access other FileStreams can have to the same file, the buffer size, and additional file options. From c8ca2fcaf9f3beba0e884fd09b499fe506671986 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 10 Sep 2026 15:51:56 +0200 Subject: [PATCH 5/5] Update bufferSize parameter documentation Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- xml/System.IO/FileStream.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.IO/FileStream.xml b/xml/System.IO/FileStream.xml index c03bd8c9f65..d0f90b0d83d 100644 --- a/xml/System.IO/FileStream.xml +++ b/xml/System.IO/FileStream.xml @@ -1218,7 +1218,7 @@ The file was too large (when One of the enumeration values that determines how to open or create the file. A bitwise combination of the enumeration values that determines how the file can be accessed by the object. This also determines the values returned by the and properties of the object. is if specifies a disk file. A bitwise combination of the enumeration values that determines how the file will be shared by processes. - A non-negative value indicating the buffer size. The default buffer size is 4096. In .NET 6 and later versions, a value of 0 disables buffering (a value of 1 disables buffering in every version). + A non-negative value indicating the buffer size. The default buffer size is 4096. In versions earlier than .NET 6, this value must be greater than 0. In .NET 6 and later versions, a value of 0 disables buffering (a value of 1 disables buffering in every version). A bitwise combination of the enumeration values that specifies additional file options. Initializes a new instance of the class with the specified path, creation mode, read/write and sharing permission, the access other FileStreams can have to the same file, the buffer size, and additional file options.