Voir les entrées d'archive When extracting archives, developers sometimes want to do a quick inspection to confirm whether an entry exists within the archive, as extracting an archive can be costly at times. IronZIP lets you view the archive entries within the archive without extracting them first, saving you time and allowing you to inspect and verify files quickly before extracting them. Within this example, we'll quickly go through an example of utilizing the Entry class within IronZipArchive to obtain the list of entries within the archive and print out the names of the entries for inspection. View Archvie Entries with C# using IronZip; using (var archive = new IronZipArchive("existing.zip")) List entries = archive.Entries(); foreach (Entry entry in entries) Console.WriteLine(entry.Name); Importing Existing Archive We first import the namespace IronZip. Afterwards, we initialize a new IronZipArchive with the path to the ZIP Archive as the parameter to load the archive. Viewing The Contents of the Archive After importing the ZIP archive, we can utilize the class properties of IronZipArchive to obtain the list of entries within the archive. The Entries property within the IronZipArchive returns a of Entry within the archive. Entry Property The Entry property contains several properties such as the name, size, version, and other properties such as comments and the encryption method used to create that entry. In this example, we utilize a for loop to loop over the number of entries within the list to print out all the names of the entries within the archive, showcasing the versatility of looking through the entries without extracting them. For a complete list of properities available for the class Entry, please refer here. Learn to Create, Read & Extract ZIP Files with IronZip Liens de documentation associés Voir sur Github Tutoriel connexe Guide pratique connexe Documentation de classe Télécharger IronZIP DLL Signaler un problème sur cette page Prêt à commencer? Nuget Téléchargements 16,000 | Version : 2025.11 vient de sortir Téléchargement gratuit NuGet Total des téléchargements :16,000 Voir Licences
Testez dans un environnement en direct Testez en production sans filigranes.Fonctionne où que vous en ayez besoin.
Produit entièrement fonctionnel Profitez de 30 jours de produit entièrement fonctionnel.Configurez-le et faites-le fonctionner en quelques minutes.
Testez dans un environnement en direct Testez en production sans filigranes.Fonctionne où que vous en ayez besoin.
Produit entièrement fonctionnel Profitez de 30 jours de produit entièrement fonctionnel.Configurez-le et faites-le fonctionner en quelques minutes.