how to find list of files inside zip file without unzipping it in c#.
+2
A:
With sharpziplib:
ZipInputStream zip = new ZipInputStream(File.OpenRead(path));
ZipEntry item;
while ((item = zip.GetNextEntry()) != null)
{
Console.WriteLine(item.Name);
}
Marc Gravell
2010-07-03 07:35:25
is it possible without sharpziplib.
Niraj Choubey
2010-07-03 07:39:21
@Niraj Choubey: yes, with some other ZIP library (like http://dotnetzip.codeplex.com/) ..... or you have to re-create the whole ZIP code yourself just to peek inside the ZIP file....
marc_s
2010-07-03 07:55:24
maybe the `System.IO` will support ZIP archives natively in a future version of the .NET framework - see http://blogs.msdn.com/b/bclteam/archive/2010/06/28/working-with-zip-files-in-net.aspx
marc_s
2010-07-04 07:19:25