packages/System.IO.Compression.ZipFile.4.3.0/ref/netstandard1.3/zh-hant/System.IO.Compression.ZipFile.xml

(开头部分) 34KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?xml version="1.0" encoding="utf-8"?>
<doc>
  <assembly>
    <name>System.IO.Compression.ZipFile</name>
  </assembly>
  <members>
    <member name="T:System.IO.Compression.ZipFile">
      <summary>提供建立、解壓縮及開啟 zip 封存的靜態方法。</summary>
    </member>
    <member name="M:System.IO.Compression.ZipFile.CreateFromDirectory(System.String,System.String)">
      <summary>建立包含指定目錄中檔案及目錄的 zip 封存。</summary>
      <param name="sourceDirectoryName">要封存的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
      <param name="destinationArchiveFileName">要建立之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
      <exception cref="T:System.ArgumentException">
        <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>
      <exception cref="T:System.ArgumentNullException">
        <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is null.</exception>
      <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>
      <exception cref="T:System.IO.DirectoryNotFoundException">
        <paramref name="sourceDirectoryName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
      <exception cref="T:System.IO.IOException">
        <paramref name="destinationArchiveFileName" /> already exists.-or-A file in the specified directory could not be opened.</exception>
      <exception cref="T:System.UnauthorizedAccessException">
        <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>
      <exception cref="T:System.NotSupportedException">
        <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> contains an invalid format.-or-The zip archive does not support writing.</exception>
    </member>
    <member name="M:System.IO.Compression.ZipFile.CreateFromDirectory(System.String,System.String,System.IO.Compression.CompressionLevel,System.Boolean)">
      <summary>建立 zip 封存,這個封存包含指定之目錄中的檔案及目錄,使用指定的壓縮等級,並選擇性包含基底目錄。</summary>
      <param name="sourceDirectoryName">要封存的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
      <param name="destinationArchiveFileName">要建立之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
      <param name="compressionLevel">其中一個列舉值,指出建立項目時是否要強調速度或壓縮的效益。</param>
      <param name="includeBaseDirectory">true 表示從 <paramref name="sourceDirectoryName" /> (位於封存根目錄中) 包含目錄名稱,false 表示只包含目錄的內容。</param>
      <exception cref="T:System.ArgumentException">
        <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>
      <exception cref="T:System.ArgumentNullException">
        <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is null.</exception>
      <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>
      <exception cref="T:System.IO.DirectoryNotFoundException">
        <paramref name="sourceDirectoryName" /> is invalid or does not exist (for example, it is on an unmapped drive).</exception>
      <exception cref="T:System.IO.IOException">
        <paramref name="destinationArchiveFileName" /> already exists.-or-A file in the specified directory could not be opened.</exception>
      <exception cref="T:System.UnauthorizedAccessException">
        <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>
      <exception cref="T:System.NotSupportedException">
        <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> contains an invalid format.-or-The zip archive does not support writing.</exception>
    </member>
    <member name="M:System.IO.Compression.ZipFile.CreateFromDirectory(System.String,System.String,System.IO.Compression.CompressionLevel,System.Boolean,System.Text.Encoding)">
      <summary>建立 zip 封存,這個封存包含指定之目錄中的檔案及目錄,針對項目名稱使用指定的壓縮等級和字元編碼方式,並選擇性包含基底目錄。</summary>
      <param name="sourceDirectoryName">要封存的目錄路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
      <param name="destinationArchiveFileName">要建立之封存的路徑 (指定為相對或絕對路徑)。相對路徑會解譯為與目前的工作目錄相對。</param>
      <param name="compressionLevel">其中一個列舉值,指出建立項目時是否要強調速度或壓縮的效益。</param>
      <param name="includeBaseDirectory">true 表示從 <paramref name="sourceDirectoryName" /> (位於封存根目錄中) 包含目錄名稱,false 表示只包含目錄的內容。</param>
      <param name="entryNameEncoding">在此封存中讀取或寫入項目名稱時要使用的編碼方式。只有需要編碼以與 Zip 封存工具和程式庫互通,且這類工具和程式庫不支援項目名稱使用 UTF-8 編碼時,才指定此參數的值。</param>
      <exception cref="T:System.ArgumentException">
        <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>
      <exception cref="T:System.ArgumentNullException">
        <paramref name="sourceDirectoryName" /> or <paramref name="destinationArchiveFileName" /> is null.</exception>
      <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>
      <exception cref="T:System.IO.DirectoryNotFoundException">
后面还有 219 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。