My code to zip files is as follows
ZipArchive zip = ZipFile.Open(destToZip, ZipArchiveMode.Create);
zip.CreateEntry("pubEd/");
string[] fileEntries = Directory.GetFiles(dirToZip);
foreach (string fileName in fileEntries)
zip.CreateEntryFromFile(fileName,Path.GetFileName(fileName), CompressionLevel.Optimal);
zip.Dispose();
In the second line of the code once after creating a zip file I create a folder with a name pubEd inside the zip file.
In the next line I am adding files to the zip folder.
What is happening is files get added to the zip directly.
I want to add these files inside the directory which I created inside the zip.
How do I do that?