The list of filenames for the entries contained within the zip archive.

C# | Visual Basic | Visual C++ |
public ICollection<string> EntryFileNames { get; }
Public ReadOnly Property EntryFileNames As ICollection(Of String) Get
public: property ICollection<String^>^ EntryFileNames { ICollection<String^>^ get (); }

The list of strings for the filenames contained within the Zip archive.

According to the ZIP specification, the names of the entries use forward
slashes in pathnames. If you are scanning through the list, you may have
to swap forward slashes for backslashes.

This example shows one way to test if a filename is already contained
within a zip archive.
CopyC#
CopyVB.NET

String zipFileToRead= "PackedDocuments.zip"; string candidate = "DatedMaterial.xps"; using (ZipFile zip = new ZipFile(zipFileToRead)) { if (zip.EntryFilenames.Contains(candidate)) Console.WriteLine("The file '{0}' exists in the zip archive '{1}'", candidate, zipFileName); else Console.WriteLine("The file, '{0}', does not exist in the zip archive '{1}'", candidate, zipFileName); Console.WriteLine(); }

Dim zipFileToRead As String = "PackedDocuments.zip" Dim candidate As String = "DatedMaterial.xps" Using zip As ZipFile.Read(ZipFileToRead) If zip.EntryFilenames.Contains(candidate) Then Console.WriteLine("The file '{0}' exists in the zip archive '{1}'", _ candidate, _ zipFileName) Else Console.WriteLine("The file, '{0}', does not exist in the zip archive '{1}'", _ candidate, _ zipFileName) End If Console.WriteLine End Using
