You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

System.IO.Compression.ZipFile.xml 35 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <doc>
  3. <assembly>
  4. <name>System.IO.Compression.ZipFile</name>
  5. </assembly>
  6. <members>
  7. <member name="T:System.IO.Compression.ZipFile">
  8. <summary>提供建立、解壓縮及開啟 zip 封存的靜態方法。</summary>
  9. </member>
  10. <member name="M:System.IO.Compression.ZipFile.CreateFromDirectory(System.String,System.String)">
  11. <summary>建立包含指定目錄中檔案及目錄的 zip 封存。</summary>
  12. <param name="sourceDirectoryName">要封存的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  13. <param name="destinationArchiveFileName">要建立之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  14. <exception cref="T:System.ArgumentException">
  15. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
  16. <exception cref="T:System.ArgumentNullException">
  17. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is null.</exception>
  18. <exception cref="T:System.IO.PathTooLongException">In <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" />, the specified path, file name, or both exceed the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  19. <exception cref="T:System.IO.DirectoryNotFoundException">
  20. <paramref name="sourceDirectoryName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
  21. <exception cref="T:System.IO.IOException">
  22. <paramref name="destinationArchiveFileName" /> already exists.-or-A file in the specified directory could not be opened.</exception>
  23. <exception cref="T:System.UnauthorizedAccessException">
  24. <paramref name="destinationArchiveFileName" /> specifies a directory.-or-The caller does not have the required permission to access the directory specified in <paramref name="sourceDirectoryName" /> or the file specified in <paramref name="destinationArchiveFileName" />.</exception>
  25. <exception cref="T:System.NotSupportedException">
  26. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> contains an invalid format.-or-The zip archive does not support writing.</exception>
  27. </member>
  28. <member name="M:System.IO.Compression.ZipFile.CreateFromDirectory(System.String,System.String,System.IO.Compression.CompressionLevel,System.Boolean)">
  29. <summary>建立 zip 封存,這個封存包含指定之目錄中的檔案及目錄,使用指定的壓縮等級,並選擇性包含基底目錄。</summary>
  30. <param name="sourceDirectoryName">要封存的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  31. <param name="destinationArchiveFileName">要建立之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  32. <param name="compressionLevel">其中一個列舉值,指出建立項目時是否要強調速度或壓縮的效益。</param>
  33. <param name="includeBaseDirectory">true 表示從 <paramref name="sourceDirectoryName" /> (位於封存根目錄中) 包含目錄名稱,false 表示只包含目錄的內容。</param>
  34. <exception cref="T:System.ArgumentException">
  35. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
  36. <exception cref="T:System.ArgumentNullException">
  37. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is null.</exception>
  38. <exception cref="T:System.IO.PathTooLongException">In <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" />, the specified path, file name, or both exceed the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  39. <exception cref="T:System.IO.DirectoryNotFoundException">
  40. <paramref name="sourceDirectoryName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
  41. <exception cref="T:System.IO.IOException">
  42. <paramref name="destinationArchiveFileName" /> already exists.-or-A file in the specified directory could not be opened.</exception>
  43. <exception cref="T:System.UnauthorizedAccessException">
  44. <paramref name="destinationArchiveFileName" /> specifies a directory.-or-The caller does not have the required permission to access the directory specified in <paramref name="sourceDirectoryName" /> or the file specified in <paramref name="destinationArchiveFileName" />.</exception>
  45. <exception cref="T:System.NotSupportedException">
  46. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> contains an invalid format.-or-The zip archive does not support writing.</exception>
  47. </member>
  48. <member name="M:System.IO.Compression.ZipFile.CreateFromDirectory(System.String,System.String,System.IO.Compression.CompressionLevel,System.Boolean,System.Text.Encoding)">
  49. <summary>建立 zip 封存,這個封存包含指定之目錄中的檔案及目錄,針對項目名稱使用指定的壓縮等級和字元編碼方式,並選擇性包含基底目錄。</summary>
  50. <param name="sourceDirectoryName">要封存的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  51. <param name="destinationArchiveFileName">要建立之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  52. <param name="compressionLevel">其中一個列舉值,指出建立項目時是否要強調速度或壓縮的效益。</param>
  53. <param name="includeBaseDirectory">true 表示從 <paramref name="sourceDirectoryName" /> (位於封存根目錄中) 包含目錄名稱,false 表示只包含目錄的內容。</param>
  54. <param name="entryNameEncoding">在此封存中讀取或寫入項目名稱時要使用的編碼方式。只有需要編碼以與 Zip 封存工具和程式庫互通,且這類工具和程式庫不支援項目名稱使用 UTF-8 編碼時,才指定此參數的值。</param>
  55. <exception cref="T:System.ArgumentException">
  56. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.-or-<paramref name="entryNameEncoding" /> is set to a Unicode encoding other than UTF-8.</exception>
  57. <exception cref="T:System.ArgumentNullException">
  58. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is null.</exception>
  59. <exception cref="T:System.IO.PathTooLongException">In <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" />, the specified path, file name, or both exceed the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  60. <exception cref="T:System.IO.DirectoryNotFoundException">
  61. <paramref name="sourceDirectoryName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
  62. <exception cref="T:System.IO.IOException">
  63. <paramref name="destinationArchiveFileName" /> already exists.-or-A file in the specified directory could not be opened.</exception>
  64. <exception cref="T:System.UnauthorizedAccessException">
  65. <paramref name="destinationArchiveFileName" /> specifies a directory.-or-The caller does not have the required permission to access the directory specified in <paramref name="sourceDirectoryName" /> or the file specified in <paramref name="destinationArchiveFileName" />.</exception>
  66. <exception cref="T:System.NotSupportedException">
  67. <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> contains an invalid format.-or-The zip archive does not support writing.</exception>
  68. </member>
  69. <member name="M:System.IO.Compression.ZipFile.ExtractToDirectory(System.String,System.String)">
  70. <summary>將指定之 zip 封存中的所有檔案解壓縮到檔案系統上的目錄。</summary>
  71. <param name="sourceArchiveFileName">要擷取之封存的路徑。</param>
  72. <param name="destinationDirectoryName">要在其中放置解壓縮檔案的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  73. <exception cref="T:System.ArgumentException">
  74. <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
  75. <exception cref="T:System.ArgumentNullException">
  76. <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> is null.</exception>
  77. <exception cref="T:System.IO.PathTooLongException">The specified path in <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> exceeds the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  78. <exception cref="T:System.IO.DirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
  79. <exception cref="T:System.IO.IOException">The directory specified by <paramref name="destinationDirectoryName" /> already exists.-or-The name of an entry in the archive is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.-or-Extracting an archive entry would create a file that is outside the directory specified by <paramref name="destinationDirectoryName" />.(For example, this might happen if the entry name contains parent directory accessors.)-or-An archive entry to extract has the same name as an entry that has already been extracted from the same archive.</exception>
  80. <exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission to access the archive or the destination directory.</exception>
  81. <exception cref="T:System.NotSupportedException">
  82. <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> contains an invalid format.</exception>
  83. <exception cref="T:System.IO.FileNotFoundException">
  84. <paramref name="sourceArchiveFileName" /> was not found.</exception>
  85. <exception cref="T:System.IO.InvalidDataException">The archive specified by <paramref name="sourceArchiveFileName" /> is not a valid zip archive.-or-An archive entry was not found or was corrupt.-or-An archive entry was compressed by using a compression method that is not supported.</exception>
  86. </member>
  87. <member name="M:System.IO.Compression.ZipFile.ExtractToDirectory(System.String,System.String,System.Text.Encoding)">
  88. <summary>將指定之 zip 封存中的所有檔案解壓縮到檔案系統上的目錄,並對項目名稱使用指定的字元編碼方式。</summary>
  89. <param name="sourceArchiveFileName">要擷取之封存的路徑。</param>
  90. <param name="destinationDirectoryName">要在其中放置解壓縮檔案的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  91. <param name="entryNameEncoding">在此封存中讀取或寫入項目名稱時要使用的編碼方式。只有需要編碼以與 Zip 封存工具和程式庫互通,且這類工具和程式庫不支援項目名稱使用 UTF-8 編碼時,才指定此參數的值。</param>
  92. <exception cref="T:System.ArgumentException">
  93. <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.-or-<paramref name="entryNameEncoding" /> is set to a Unicode encoding other than UTF-8.</exception>
  94. <exception cref="T:System.ArgumentNullException">
  95. <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> is null.</exception>
  96. <exception cref="T:System.IO.PathTooLongException">The specified path in <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> exceeds the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  97. <exception cref="T:System.IO.DirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
  98. <exception cref="T:System.IO.IOException">The directory specified by <paramref name="destinationDirectoryName" /> already exists.-or-The name of an entry in the archive is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.-or-Extracting an archive entry would create a file that is outside the directory specified by <paramref name="destinationDirectoryName" />.(For example, this might happen if the entry name contains parent directory accessors.)-or-An archive entry to extract has the same name as an entry that has already been extracted from the same archive.</exception>
  99. <exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission to access the archive or the destination directory.</exception>
  100. <exception cref="T:System.NotSupportedException">
  101. <paramref name="destinationDirectoryName" /> or <paramref name="sourceArchiveFileName" /> contains an invalid format.</exception>
  102. <exception cref="T:System.IO.FileNotFoundException">
  103. <paramref name="sourceArchiveFileName" /> was not found.</exception>
  104. <exception cref="T:System.IO.InvalidDataException">The archive specified by <paramref name="sourceArchiveFileName" /> is not a valid zip archive.-or-An archive entry was not found or was corrupt.-or-An archive entry was compressed by using a compression method that is not supported.</exception>
  105. </member>
  106. <member name="M:System.IO.Compression.ZipFile.Open(System.String,System.IO.Compression.ZipArchiveMode)">
  107. <summary>在指定路徑上以指定的模式開啟 zip 封存。</summary>
  108. <returns>已開啟的 zip 封存。</returns>
  109. <param name="archiveFileName">要開啟之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  110. <param name="mode">其中一個列舉值,指定在開啟的封存檔中項目上所允許的動作。</param>
  111. <exception cref="T:System.ArgumentException">
  112. <paramref name="archiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
  113. <exception cref="T:System.ArgumentNullException">
  114. <paramref name="archiveFileName" /> is null.</exception>
  115. <exception cref="T:System.IO.PathTooLongException">In <paramref name="archiveFileName" />, the specified path, file name, or both exceed the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  116. <exception cref="T:System.IO.DirectoryNotFoundException">
  117. <paramref name="archiveFileName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
  118. <exception cref="T:System.IO.IOException">
  119. <paramref name="archiveFileName" /> could not be opened.-or-<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>
  120. <exception cref="T:System.UnauthorizedAccessException">
  121. <paramref name="archiveFileName" /> specifies a directory.-or-The caller does not have the required permission to access the file specified in <paramref name="archiveFileName" />.</exception>
  122. <exception cref="T:System.ArgumentOutOfRangeException">
  123. <paramref name="mode" /> specifies an invalid value.</exception>
  124. <exception cref="T:System.IO.FileNotFoundException">
  125. <paramref name="mode" /> is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Read" />, but the file specified in <paramref name="archiveFileName" /> is not found.</exception>
  126. <exception cref="T:System.NotSupportedException">
  127. <paramref name="archiveFileName" /> contains an invalid format.</exception>
  128. <exception cref="T:System.IO.InvalidDataException">
  129. <paramref name="archiveFileName" /> could not be interpreted as a zip archive.-or-<paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" />, but an entry is missing or corrupt and cannot be read.-or-<paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" />, but an entry is too large to fit into memory.</exception>
  130. </member>
  131. <member name="M:System.IO.Compression.ZipFile.Open(System.String,System.IO.Compression.ZipArchiveMode,System.Text.Encoding)">
  132. <summary>使用指定的模式,並將指定的字元編碼方式使用於項目名稱,即可開啟位於指定路徑的 zip 封存。</summary>
  133. <returns>已開啟的 zip 封存。</returns>
  134. <param name="archiveFileName">要開啟之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  135. <param name="mode">其中一個列舉值,指定在開啟的封存檔中項目上所允許的動作。</param>
  136. <param name="entryNameEncoding">在此封存中讀取或寫入項目名稱時要使用的編碼方式。只有需要編碼以與 Zip 封存工具和程式庫互通,且這類工具和程式庫不支援項目名稱使用 UTF-8 編碼時,才指定此參數的值。</param>
  137. <exception cref="T:System.ArgumentException">
  138. <paramref name="archiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.-or-<paramref name="entryNameEncoding" /> is set to a Unicode encoding other than UTF-8.</exception>
  139. <exception cref="T:System.ArgumentNullException">
  140. <paramref name="archiveFileName" /> is null.</exception>
  141. <exception cref="T:System.IO.PathTooLongException">In <paramref name="archiveFileName" />, the specified path, file name, or both exceed the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  142. <exception cref="T:System.IO.DirectoryNotFoundException">
  143. <paramref name="archiveFileName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
  144. <exception cref="T:System.IO.IOException">
  145. <paramref name="archiveFileName" /> could not be opened.-or-<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>
  146. <exception cref="T:System.UnauthorizedAccessException">
  147. <paramref name="archiveFileName" /> specifies a directory.-or-The caller does not have the required permission to access the file specified in <paramref name="archiveFileName" />.</exception>
  148. <exception cref="T:System.ArgumentOutOfRangeException">
  149. <paramref name="mode" /> specifies an invalid value.</exception>
  150. <exception cref="T:System.IO.FileNotFoundException">
  151. <paramref name="mode" /> is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Read" />, but the file specified in <paramref name="archiveFileName" /> is not found.</exception>
  152. <exception cref="T:System.NotSupportedException">
  153. <paramref name="archiveFileName" /> contains an invalid format.</exception>
  154. <exception cref="T:System.IO.InvalidDataException">
  155. <paramref name="archiveFileName" /> could not be interpreted as a zip archive.-or-<paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" />, but an entry is missing or corrupt and cannot be read.-or-<paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" />, but an entry is too large to fit into memory.</exception>
  156. </member>
  157. <member name="M:System.IO.Compression.ZipFile.OpenRead(System.String)">
  158. <summary>開啟位於指定路徑的 zip 封存以讀取。</summary>
  159. <returns>已開啟的 zip 封存。</returns>
  160. <param name="archiveFileName">要開啟之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
  161. <exception cref="T:System.ArgumentException">
  162. <paramref name="archiveFileName" /> is <see cref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
  163. <exception cref="T:System.ArgumentNullException">
  164. <paramref name="archiveFileName" /> is null.</exception>
  165. <exception cref="T:System.IO.PathTooLongException">In <paramref name="archiveFileName" />, the specified path, file name, or both exceed the system-defined maximum length.For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
  166. <exception cref="T:System.IO.DirectoryNotFoundException">
  167. <paramref name="archiveFileName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
  168. <exception cref="T:System.IO.IOException">
  169. <paramref name="archiveFileName" /> could not be opened.</exception>
  170. <exception cref="T:System.UnauthorizedAccessException">
  171. <paramref name="archiveFileName" /> specifies a directory.-or-The caller does not have the required permission to access the file specified in <paramref name="archiveFileName" />.</exception>
  172. <exception cref="T:System.IO.FileNotFoundException">The file specified in <paramref name="archiveFileName" /> is not found.</exception>
  173. <exception cref="T:System.NotSupportedException">
  174. <paramref name="archiveFileName" /> contains an invalid format.</exception>
  175. <exception cref="T:System.IO.InvalidDataException">
  176. <paramref name="archiveFileName" /> could not be interpreted as a zip archive.</exception>
  177. </member>
  178. <member name="T:System.IO.Compression.ZipFileExtensions">
  179. <summary>提供 <see cref="T:System.IO.Compression.ZipArchive" /> 和 <see cref="T:System.IO.Compression.ZipArchiveEntry" /> 類別的擴充方法。</summary>
  180. </member>
  181. <member name="M:System.IO.Compression.ZipFileExtensions.CreateEntryFromFile(System.IO.Compression.ZipArchive,System.String,System.String)">
  182. <summary>透過將檔案壓縮並加入至 zip 封存的方式進行封存。</summary>
  183. <returns>zip 封存中之新項目的包裝函式。</returns>
  184. <param name="destination">要將檔案加入至其中的 Zip 封存。</param>
  185. <param name="sourceFileName">要封存的檔案之路徑。您可以指定相對或相對路徑。相對路徑會解譯為與目前的工作目錄相對。</param>
  186. <param name="entryName">要在 Zip 封存中建立之項目的名稱。</param>
  187. <exception cref="T:System.ArgumentException">
  188. <paramref name="sourceFileName" /> 為 <see cref="F:System.String.Empty" />,只含有空白字元,或者含有至少一個無效字元。-或-<paramref name="entryName" /> 為 <see cref="F:System.String.Empty" />。</exception>
  189. <exception cref="T:System.ArgumentNullException">
  190. <paramref name="sourceFileName" /> 或 <paramref name="entryName" /> 是 null。</exception>
  191. <exception cref="T:System.IO.PathTooLongException">在 <paramref name="sourceFileName" /> 中,指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑不得超過 248 個字元,而檔案名稱不得超過 260 個字元。</exception>
  192. <exception cref="T:System.IO.DirectoryNotFoundException">
  193. <paramref name="sourceFileName" /> 無效 (例如,位於未對應的磁碟機上)。</exception>
  194. <exception cref="T:System.IO.IOException">無法開啟 <paramref name="sourceFileName" /> 指定的檔案。</exception>
  195. <exception cref="T:System.UnauthorizedAccessException">
  196. <paramref name="sourceFileName" /> 指定目錄。-或-呼叫端沒有所需的使用權限來存取 <paramref name="sourceFileName" /> 指定的檔案。</exception>
  197. <exception cref="T:System.IO.FileNotFoundException">找不到 <paramref name="sourceFileName" /> 所指定的檔案。</exception>
  198. <exception cref="T:System.NotSupportedException">
  199. <paramref name="sourceFileName" /> 參數的格式無效。-或-Zip 封存不支援寫入。</exception>
  200. <exception cref="T:System.ObjectDisposedException">Zip 封存已經處置。</exception>
  201. </member>
  202. <member name="M:System.IO.Compression.ZipFileExtensions.CreateEntryFromFile(System.IO.Compression.ZipArchive,System.String,System.String,System.IO.Compression.CompressionLevel)">
  203. <summary>透過將檔案以指定之壓縮等級壓縮並加入至 zip 封存的方式進行封存。</summary>
  204. <returns>zip 封存中之新項目的包裝函式。</returns>
  205. <param name="destination">要將檔案加入至其中的 Zip 封存。</param>
  206. <param name="sourceFileName">要封存的檔案之路徑。您可以指定相對或相對路徑。相對路徑會解譯為與目前的工作目錄相對。</param>
  207. <param name="entryName">要在 Zip 封存中建立之項目的名稱。</param>
  208. <param name="compressionLevel">其中一個列舉值,指出當建立項目時是否要強調速度或壓縮的效益。</param>
  209. <exception cref="T:System.ArgumentException">
  210. <paramref name="sourceFileName" /> 為 <see cref="F:System.String.Empty" />,只含有空白字元,或者含有至少一個無效字元。-或-<paramref name="entryName" /> 為 <see cref="F:System.String.Empty" />。</exception>
  211. <exception cref="T:System.ArgumentNullException">
  212. <paramref name="sourceFileName" /> 或 <paramref name="entryName" /> 是 null。</exception>
  213. <exception cref="T:System.IO.DirectoryNotFoundException">
  214. <paramref name="sourceFileName" /> 無效 (例如,位於未對應的磁碟機上)。</exception>
  215. <exception cref="T:System.IO.PathTooLongException">在 <paramref name="sourceFileName" /> 中,指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑不得超過 248 個字元,而檔案名稱不得超過 260 個字元。</exception>
  216. <exception cref="T:System.IO.IOException">無法開啟 <paramref name="sourceFileName" /> 指定的檔案。</exception>
  217. <exception cref="T:System.UnauthorizedAccessException">
  218. <paramref name="sourceFileName" /> 指定目錄。-或-呼叫端沒有所需的使用權限來存取 <paramref name="sourceFileName" /> 指定的檔案。</exception>
  219. <exception cref="T:System.IO.FileNotFoundException">找不到 <paramref name="sourceFileName" /> 所指定的檔案。</exception>
  220. <exception cref="T:System.NotSupportedException">
  221. <paramref name="sourceFileName" /> 參數的格式無效。-或-Zip 封存不支援寫入。</exception>
  222. <exception cref="T:System.ObjectDisposedException">Zip 封存已經處置。</exception>
  223. </member>
  224. <member name="M:System.IO.Compression.ZipFileExtensions.ExtractToDirectory(System.IO.Compression.ZipArchive,System.String)">
  225. <summary>將 zip 封存中的所有檔案解壓縮到檔案系統上的目錄。</summary>
  226. <param name="source">做為檔案解壓縮來源的 zip 封存。</param>
  227. <param name="destinationDirectoryName">要在其中放置解壓縮檔案的目錄路徑。您可以指定相對或相對路徑。相對路徑會解譯為與目前的工作目錄相對。</param>
  228. <exception cref="T:System.ArgumentException">
  229. <paramref name="destinationDirectoryName" /> 為 <see cref="F:System.String.Empty" />,只含有空白字元,或者含有至少一個無效字元。</exception>
  230. <exception cref="T:System.ArgumentNullException">
  231. <paramref name="destinationDirectoryName" /> 為 null。</exception>
  232. <exception cref="T:System.IO.PathTooLongException">指定的路徑超過系統定義的最大長度。例如:在 Windows 平台上,路徑不得超過 248 個字元,而檔案名稱不得超過 260 個字元。</exception>
  233. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  234. <exception cref="T:System.IO.IOException">
  235. <paramref name="destinationDirectoryName" /> 指定的目錄已存在。-或-封存檔中的項目名稱是<see cref="F:System.String.Empty" />,只包含空白字元,或包含至少一個無效的字元。-或-從封存解壓縮封存項目會建立 <paramref name="destinationDirectoryName" /> 所指定目錄外的檔案。(例如,如果項目名稱包含父目錄存取子,這就可能發生)。-或-在封存中兩個或多個項目具有相同的名稱。</exception>
  236. <exception cref="T:System.UnauthorizedAccessException">呼叫端不具有寫入目的地目錄的必要權限。</exception>
  237. <exception cref="T:System.NotSupportedException">
  238. <paramref name="destinationDirectoryName" /> 包含無效的格式。</exception>
  239. <exception cref="T:System.IO.InvalidDataException">找不到封存項目,或是其已損毀。-或-封存項目使用不支援的壓縮方法加以壓縮。</exception>
  240. </member>
  241. <member name="M:System.IO.Compression.ZipFileExtensions.ExtractToFile(System.IO.Compression.ZipArchiveEntry,System.String)">
  242. <summary>將 zip 封存中的項目解壓縮至檔案。</summary>
  243. <param name="source">做為檔案解壓縮來源的 zip 封存項目。</param>
  244. <param name="destinationFileName">要從項目內容建立的檔案的路徑。您可以指定相對或相對路徑。相對路徑會解譯為與目前的工作目錄相對。</param>
  245. <exception cref="T:System.ArgumentException">
  246. <paramref name="destinationFileName" /> 是長度為零的字串、只包含泛空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。-或-<paramref name="destinationFileName" /> 指定目錄。</exception>
  247. <exception cref="T:System.ArgumentNullException">
  248. <paramref name="destinationFileName" /> 為 null。</exception>
  249. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑不得超過 248 個字元,而檔案名稱不得超過 260 個字元。</exception>
  250. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  251. <exception cref="T:System.IO.IOException">
  252. <paramref name="destinationFileName" /> 已存在。-或-發生 I/O 錯誤。-或-項目目前已開啟以進行寫入。-或-項目已經從封存中刪除。</exception>
  253. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有所需的使用權限來建立新檔。</exception>
  254. <exception cref="T:System.IO.InvalidDataException">此項目可能是從封存中遺失,或已損毀且無法讀取。-或-藉由使用不支援的壓縮方法壓縮了項目。</exception>
  255. <exception cref="T:System.ObjectDisposedException">這個項目所屬的 Zip 封存已經過處置。</exception>
  256. <exception cref="T:System.NotSupportedException">
  257. <paramref name="destinationFileName" /> 的格式無效。-或-這個項目的 Zip 封存的開啟模式是 <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />,該模式不允許擷取項目。</exception>
  258. </member>
  259. <member name="M:System.IO.Compression.ZipFileExtensions.ExtractToFile(System.IO.Compression.ZipArchiveEntry,System.String,System.Boolean)">
  260. <summary>將 zip 封存中的項目解壓縮至檔案,並選擇性覆寫名稱相同的現有檔案。</summary>
  261. <param name="source">做為檔案解壓縮來源的 zip 封存項目。</param>
  262. <param name="destinationFileName">要從項目內容建立的檔案的路徑。您可以指定相對或相對路徑。相對路徑會解譯為與目前的工作目錄相對。</param>
  263. <param name="overwrite">true 表示要覆寫與目的檔案同名的現有檔案,否則為 false。</param>
  264. <exception cref="T:System.ArgumentException">
  265. <paramref name="destinationFileName" /> 是長度為零的字串、只包含泛空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。-或-<paramref name="destinationFileName" /> 指定目錄。</exception>
  266. <exception cref="T:System.ArgumentNullException">
  267. <paramref name="destinationFileName" /> 為 null。</exception>
  268. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑不得超過 248 個字元,而檔案名稱不得超過 260 個字元。</exception>
  269. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  270. <exception cref="T:System.IO.IOException">
  271. <paramref name="destinationFileName" /> 已存在且 <paramref name="overwrite" /> 為 false。-或-發生 I/O 錯誤。-或-項目目前已開啟以進行寫入。-或-項目已經從封存中刪除。</exception>
  272. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有所需的使用權限來建立新檔。</exception>
  273. <exception cref="T:System.IO.InvalidDataException">此項目可能是從封存中遺失,或已損毀且無法讀取。-或-藉由使用不支援的壓縮方法壓縮了項目。</exception>
  274. <exception cref="T:System.ObjectDisposedException">這個項目所屬的 Zip 封存已經過處置。</exception>
  275. <exception cref="T:System.NotSupportedException">
  276. <paramref name="destinationFileName" /> 的格式無效。-或-這個項目的 Zip 封存的開啟模式是 <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />,該模式不允許擷取項目。</exception>
  277. </member>
  278. </members>
  279. </doc>