[
  {
    "Id": "149232",
    "ThreadId": "44809",
    "Html": "Hi,<br>\r\n<br>\r\nIs there any way to list the directories conatined in the zip file rather than every file?<br>\r\n<br>\r\nThanks\r\n",
    "PostedDate": "2009-01-21T06:15:59.287-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "149296",
    "ThreadId": "44809",
    "Html": "Use the IsDirectory property on the ZipEntry. For illustration, you could do something like this: <br>\r\n<pre>List&lt;string&gt;  GetContainedDirectories(string zipfile)\r\n{\r\n  List&lt;string&gt; list = new List&lt;string&gt;();\r\n  using (ZipFile zip = ZipFile.Read(&quot;MyZipFile.zip&quot;)) \r\n  {\r\n    foreach (ZipEntry e in zip) \r\n    {\r\n      if (e.IsDirectory) \r\n         list.Add(e.FileName); \r\n    }\r\n  }\r\n  return list;\r\n}\r\n\r\n</pre>\r\nIf you prefer, you could start with the above, and using the .NET 3.5 capability, with slight mods, add this method as an extension method to the ZipFile class. See <a href=\"http://en.wikipedia.org/wiki/Extension_method\">the wikipedia article</a> for an overview on the how and why of extension methods. <br>\r\n",
    "PostedDate": "2009-01-21T08:40:28.893-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]