This is the code I'm using to read and get entries from a zip file:
using (var zip = ZipFile.OpenRead(filePath)) {
// ... do stuff with zip.Entries
}
I've tried using the ZipArchive
constructor as well (which ZipFile.OpenRead
is a shortcut to).
Output from the Entries
property:
code/views/
code/views/Index.cshtml
config/qa/
config/qa/dist/
config/qa/dist/Web.config
Expected output:
code/
code/views/
code/views/Index.cshtml
config/
config/qa/
config/qa/dist/
config/qa/dist/Web.config
Why are the top-level folders/directories excluded as entries? No other directories are excluded, so this feels like inconsistent behavior to me. Is it a bug in the framework?