I would like to be able to include the file with a given order while creating a zip while using DotNet Zip.
Files don't appear in the sequence they were added to the zip.For now the order appears to be random.
I would like to have the files xyz-Header,xyz-Summary included first and then the rest of the files.
xyz-Header.csv
xyz-Summary.csv
xyz-Male.csv
xyz-Female.csv
xyz and names for other files are programmatically determined but Header and Summary files are always included.
Code Snippet
private MemoryStream GetZip()
{
ZipFile zip = new ZipFile();
List<string, string> files = getFiles();
zip.AddEntry("xyz-Header.csv", getHeader(files ));
zip.AddEntry("xyz-Summary", getSummary(files));
foreach (var x in files)
{
zip.AddEntry("xyz-" + x.Item1 + ".csv", x.Item2);
}
MemoryStream memoryStream = new MemoryStream();
zip.Save(memoryStream);
memoryStream.position = 0;
return memoryStream;
}
I would appreciate any help on this.