content inside zip file

前端 未结 2 2020
感动是毒
感动是毒 2020-12-10 08:08

how to find list of files inside zip file without unzipping it in c#.

2条回答
  •  长情又很酷
    2020-12-10 08:42

    With sharpziplib:

    ZipInputStream zip = new ZipInputStream(File.OpenRead(path));
    ZipEntry item;
    while ((item = zip.GetNextEntry()) != null)
    {
        Console.WriteLine(item.Name);
    }
    

提交回复
热议问题