Extraire 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.

Extraction de l'archive TAR

Pour commencer, nous devons inclure l'espace de noms IronZip dans notre projet, ce qui nous donne accès à ses fonctionnalités. We can then use the IronTarArchive class to extract the contents of the TAR file with the method ExtractArchiveToDirectory.

Cette fonction est conçue pour décompresser le contenu d'un fichier TAR dans un répertoire spécifié. Le paramètre initial doit être le chemin complet du fichier TAR que vous souhaitez extraire. Le deuxième paramètre indique le dossier de destination où seront stockés les fichiers décompressés.

Apprenez à créer, lire et extraire des fichiers ZIP

Prêt à commencer?
Nuget Téléchargements 17,732 | Version : 2025.12 vient de sortir