Skip to content

Commit c4f6537

Browse files
authored
Automatic port of System.IO exceptions (dotnet#4665)
Co-authored-by: carlossanlop <[email protected]>
1 parent 7bc52be commit c4f6537

File tree

5 files changed

+41
-9
lines changed

5 files changed

+41
-9
lines changed

xml/System.IO.Compression/ZipArchive.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@
302302
303303
]]></format>
304304
</remarks>
305-
<exception cref="T:System.ArgumentException">The stream is already closed, or the capabilities of the stream do not match the mode.</exception>
305+
<exception cref="T:System.ArgumentException">The stream is already closed, or the capabilities of the stream do not match the mode.
306+
307+
-or-
308+
309+
An encoding other than UTF-8 is specified for the <paramref name="entryNameEncoding" />.</exception>
306310
<exception cref="T:System.ArgumentNullException">
307311
<paramref name="stream" /> is <see langword="null" />.</exception>
308312
<exception cref="T:System.ArgumentOutOfRangeException">

xml/System.IO.Compression/ZipArchiveEntry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
3838
The methods for manipulating zip archives and their file entries are spread across three classes: <xref:System.IO.Compression.ZipFile>, <xref:System.IO.Compression.ZipArchive> and <xref:System.IO.Compression.ZipArchiveEntry>.
3939
40-
|To|Use|
40+
|To...|Use...|
4141
|---------|----------|
4242
|Create a zip archive from a directory|<xref:System.IO.Compression.ZipFile.CreateFromDirectory%2A?displayProperty=nameWithType>|
4343
|Extract the contents of a zip archive to a directory|<xref:System.IO.Compression.ZipFile.ExtractToDirectory%2A?displayProperty=nameWithType>|

xml/System.IO.Compression/ZipFile.xml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
4444
The methods for manipulating zip archives and their files are spread across three classes: <xref:System.IO.Compression.ZipFile>, <xref:System.IO.Compression.ZipArchive> and <xref:System.IO.Compression.ZipArchiveEntry>.
4545
46-
|To|Use|
46+
|To...|Use...|
4747
|---------|----------|
4848
|Create a zip archive from a directory|<xref:System.IO.Compression.ZipFile.CreateFromDirectory%2A?displayProperty=nameWithType>|
4949
|Extract the contents of a zip archive to a directory|<xref:System.IO.Compression.ZipFile.ExtractToDirectory%2A?displayProperty=nameWithType>|
@@ -159,7 +159,11 @@
159159

160160
-or-
161161

162-
A file in the specified directory could not be opened.</exception>
162+
A file in the specified directory could not be opened.
163+
164+
-or-
165+
166+
An I/O error occurred while opening a file to be archived.</exception>
163167
<exception cref="T:System.UnauthorizedAccessException">
164168
<paramref name="destinationArchiveFileName" /> specifies a directory.
165169

@@ -249,7 +253,11 @@
249253

250254
-or-
251255

252-
A file in the specified directory could not be opened.</exception>
256+
A file in the specified directory could not be opened.
257+
258+
-or-
259+
260+
An I/O error occurred while opening a file to be archived.</exception>
253261
<exception cref="T:System.UnauthorizedAccessException">
254262
<paramref name="destinationArchiveFileName" /> specifies a directory.
255263

@@ -346,7 +354,11 @@
346354

347355
-or-
348356

349-
A file in the specified directory could not be opened.</exception>
357+
A file in the specified directory could not be opened.
358+
359+
-or-
360+
361+
An I/O error occurred while opening a file to be archived.</exception>
350362
<exception cref="T:System.UnauthorizedAccessException">
351363
<paramref name="destinationArchiveFileName" /> specifies a directory.
352364

@@ -833,7 +845,11 @@ An archive entry has been compressed using a compression method that is not supp
833845

834846
-or-
835847

836-
<paramref name="mode" /> is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />, but the file specified in <paramref name="archiveFileName" /> already exists.</exception>
848+
<paramref name="mode" /> is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />, but the file specified in <paramref name="archiveFileName" /> already exists.
849+
850+
-or-
851+
852+
An unspecified I/O error occurred while opening the file.</exception>
837853
<exception cref="T:System.UnauthorizedAccessException">
838854
<paramref name="archiveFileName" /> specifies a directory.
839855

@@ -948,7 +964,11 @@ An archive entry has been compressed using a compression method that is not supp
948964

949965
-or-
950966

951-
<paramref name="mode" /> is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />, but the file specified in <paramref name="archiveFileName" /> already exists.</exception>
967+
<paramref name="mode" /> is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />, but the file specified in <paramref name="archiveFileName" /> already exists.
968+
969+
-or-
970+
971+
An unspecified I/O error occurred while opening the file.</exception>
952972
<exception cref="T:System.UnauthorizedAccessException">
953973
<paramref name="archiveFileName" /> specifies a directory.
954974

@@ -1034,7 +1054,11 @@ An archive entry has been compressed using a compression method that is not supp
10341054
<exception cref="T:System.IO.DirectoryNotFoundException">
10351055
<paramref name="archiveFileName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
10361056
<exception cref="T:System.IO.IOException">
1037-
<paramref name="archiveFileName" /> could not be opened.</exception>
1057+
<paramref name="archiveFileName" /> could not be opened.
1058+
1059+
-or-
1060+
1061+
An unspecified I/O error occurred while opening the file.</exception>
10381062
<exception cref="T:System.UnauthorizedAccessException">
10391063
<paramref name="archiveFileName" /> specifies a directory.
10401064

xml/System.IO/FileSystemAclExtensions.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ This extension method was added to .NET Core to bring the functionality that was
228228
<paramref name="directorySecurity" /> or <paramref name="path" /> is <see langword="null" />.</exception>
229229
<exception cref="T:System.ArgumentException">
230230
<paramref name="path" /> is empty.</exception>
231+
<exception cref="T:System.IO.DirectoryNotFoundException">Could not find a part of the path.</exception>
232+
<exception cref="T:System.UnauthorizedAccessException">Access to the path is denied.</exception>
231233
</Docs>
232234
</Member>
233235
<Member MemberName="GetAccessControl">

xml/System.IO/Path.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,8 @@ Paths are resolved by calling the <xref:System.IO.Path.GetFullPath%2A> method be
17831783
</remarks>
17841784
<exception cref="T:System.ArgumentNullException">
17851785
<paramref name="relativeTo" /> or <paramref name="path" /> is <see langword="null" />.</exception>
1786+
<exception cref="T:System.ArgumentException">
1787+
<paramref name="relativeTo" /> or <paramref name="path" /> is effectively empty.</exception>
17861788
<related type="article" href="/dotnet/standard/io/file-path-formats">File path formats on Windows systems</related>
17871789
</Docs>
17881790
</Member>

0 commit comments

Comments
 (0)