How can I list directories in a zip file using ZipPackage? I would like to work with the zip file as if it was a folder structure on disk, i.e. list files and directories at the current level, open some of the files as needed, then go into every folder, and so on recursively.
If possible, I would like to avoid external dependencies and I am limited to .Net 4.0.
EDIT: To make the question more concrete, assume I would like to create the following structure, that corresponds to the contents of the zip file:
interface IDirectory
{
IList<IDirectory> SubDirectories {get; }
IList<IFile> Files{get; }
string Name {get; }
//other methods
}
interface IFile
{
string Name {get; }
void UnZip (IStream stream);
}