packages/System.IO.Compression.ZipFile.4.3.0/ref/netstandard1.3/zh-hans/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">包括从在存档的根的 <paramref name="sourceDirectoryName" /> 的目录名称,则为 true;仅包含目录中的内容,则为 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">包括从在存档的根的 <paramref name="sourceDirectoryName" /> 的目录名称,则为 true;仅包含目录中的内容,则为 false。</param>
<param name="entryNameEncoding">在存档中读取或写入项名时使用的编码。仅当需要针对具有不支持项名的 UTF-8 编码的 zip 归档工具和库的互操作性进行编码时,为此参数指定一个值。</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 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
