You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<paramname="entryNameEncoding">To be added.</param>
391
-
<paramname="cancellationToken">To be added.</param>
392
-
<summary>To be added.</summary>
387
+
<paramname="stream">The input or output stream.</param>
388
+
<paramname="mode">See the description of the ZipArchiveMode enum. Read requires the stream to support reading, Create requires the stream to support writing, and Update requires the stream to support reading, writing, and seeking.</param>
389
+
<paramname="leaveOpen">
390
+
<seelangword="true" /> to leave the stream open upon disposing the ZipArchive, otherwise <seelangword="false" />.</param>
391
+
<param name="entryNameEncoding"><para>The encoding to use when reading or writing entry names and comments in this ZipArchive.</para><para>/// <para>NOTE: Specifying this parameter to values other than <see langword="null" /> is discouraged.</para><para>However, this may be necessary for interoperability with ZIP archive tools and libraries that do not correctly support UTF-8 encoding for entry names.<br /> This value is used as follows:</para><para> <strong>Reading (opening) ZIP archive files:</strong> </para><para>If <c>entryNameEncoding</c> is not specified (<c>== null</c>):</para><list> <item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the current system default code page (<c>Encoding.Default</c>) in order to decode the entry name and comment.</item> <item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) in order to decode the entry name and comment.</item> </list><para>If <c>entryNameEncoding</c> is specified (<c>!= null</c>):</para><list> <item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the specified <c>entryNameEncoding</c> in order to decode the entry name and comment.</item> <item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) in order to decode the entry name and comment.</item> </list><para> <strong>Writing (saving) ZIP archive files:</strong> </para><para>If <c>entryNameEncoding</c> is not specified (<c>== null</c>):</para><list> <item>For entry names and comments that contain characters outside the ASCII range, the language encoding flag (EFS) will be set in the general purpose bit flag of the local file header, and UTF-8 (<c>Encoding.UTF8</c>) will be used in order to encode the entry name and comment into bytes.</item> <item>For entry names and comments that do not contain characters outside the ASCII range, the language encoding flag (EFS) will not be set in the general purpose bit flag of the local file header, and the current system default code page (<c>Encoding.Default</c>) will be used to encode the entry names and comments into bytes.</item> </list><para>If <c>entryNameEncoding</c> is specified (<c>!= null</c>):</para><list> <item>The specified <c>entryNameEncoding</c> will always be used to encode the entry names and comments into bytes.</para><para>The language encoding flag (EFS) in the general purpose bit flag of the local file header will be set if and only if the specified <c>entryNameEncoding</c> is a UTF-8 encoding.</item> </list><para>Note that Unicode encodings other than UTF-8 may not be currently used for the <c>entryNameEncoding</c>, otherwise an <see cref="T:System.ArgumentException" /> is thrown.</para></param>
392
+
<paramname="cancellationToken">The optional cancellation token to monitor.</param>
393
+
<summary>Asynchronously initializes and returns a new instance of <seecref="T:System.IO.Compression.ZipArchive" /> on the given stream in the specified mode, specifying whether to leave the stream open, with an optional encoding and an optional cancellation token.</summary>
393
394
<returns>To be added.</returns>
394
395
<remarks>To be added.</remarks>
396
+
<exceptioncref="T:System.ArgumentException">
397
+
<para>The stream is already closed.</para>
398
+
<para>-or-</para>
399
+
<para>mode is incompatible with the capabilities of the stream.</para>
400
+
</exception>
401
+
<exceptioncref="T:System.ArgumentNullException">The stream is <seelangword="null" />.</exception>
402
+
<exceptioncref="T:System.ArgumentOutOfRangeException">mode specified an invalid value.</exception>
<paramname="cancellationToken">To be added.</param>
594
-
<summary>To be added.</summary>
595
-
<returns>To be added.</returns>
593
+
<paramname="cancellationToken">The token to monitor for cancellation requests.</param>
594
+
<summary>Asynchronously opens the entry. If the archive that the entry belongs to was opened in Read mode, the returned stream will be readable, and it may or may not be seekable. If Create mode, the returned stream will be writable and not seekable. If Update mode, the returned stream will be readable, writable, seekable, and support SetLength.</summary>
595
+
<returns>A Stream that represents the contents of the entry.</returns>
596
596
<remarks>To be added.</remarks>
597
+
<exceptioncref="T:System.IO.IOException">
598
+
<para>The entry is already currently open for writing.</para>
599
+
<para>-or-</para>
600
+
<para>The entry has been deleted from the archive.</para>
601
+
<para>-or-</para>
602
+
<para>The archive that this entry belongs to was opened in ZipArchiveMode.Create, and this entry has already been written to once.</para>
0 commit comments