提取TAR

TAR files are most commonly used for bundling and compressing multiple files and directories into a single archive. However, extracting them could be troublesome at times, as they are used in conjunction with GZIP and BZIP2. However, with the versatility of IronZIP, we can simply call the IronTarArchive class to extract the contents of the TAR for the last layer and then further extract it in the second format, all within a single library.

提取 TAR 压缩包

首先,我们需要在项目中包含IronZip命名空间,以便访问其功能。 We can then use the IronTarArchive class to extract the contents of the TAR file with the method ExtractArchiveToDirectory.

该函数旨在将 TAR 文件的内容解压缩到指定的目录中。 初始参数应该是要提取的 TAR 文件的完整路径。 第二个参数指示解压后的文件将存储在哪个目标文件夹中。

学习如何创建、读取和提取 ZIP 文件

准备开始了吗?
Nuget 下载 17,732 | 版本: 2025.12 刚刚发布