Interface IArchive

Interface IArchive

Namespace: Aspose.Zip
Assembly: Aspose.Zip.dll (25.1.0)

此接口表示一个归档文件。

public interface IArchive : IDisposable

实现

IDisposable

属性

FileEntries

获取构成归档的 Aspose.Zip.IArchiveFileEntry 类型的条目。

IEnumerable<iarchivefileentry> FileEntries { get; }

属性值

IEnumerable<IArchiveFileEntry&gt;

备注

仅用于压缩的归档文件,如 gzip、bzip2、lzip、lzma、xz、z,由单个记录组成 - 归档文件本身。

方法

ExtractToDirectory(string)

将归档中的所有文件提取到提供的目录中。

void ExtractToDirectory(string destinationDirectory)

参数

destinationDirectory string

要放置提取文件的目录路径。

备注

如果目录不存在,将会被创建。

异常

ArgumentNullException

destinationDirectory 为 null。

PathTooLongException

指定的路径、文件名或两者超出了系统定义的最大长度。例如,在基于 Windows 的平台上,路径必须少于 248 个字符,文件名必须少于 260 个字符。

SecurityException

调用方没有访问现有目录所需的权限。

NotSupportedException

如果目录不存在,路径包含一个不是驱动器标签(“C:\”)的一部分的冒号字符(:)。

ArgumentException

destinationDirectory 是一个零长度字符串,仅包含空白,或者包含一个或多个无效字符。您可以使用 System.IO.Path.GetInvalidPathChars 方法查询无效字符。 - 或 - 路径以冒号字符(:)为前缀,或仅包含冒号字符(:)。

IOException

由路径指定的目录是一个文件。 - 或 - 网络名称未知。

 中文