Мойн!
using (ZipFile zip = new ZipFile())
{
// add this map file into the "images" directory in the zip archive
zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
// add the report into a different directory in the archive
zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
zip.AddFile("ReadMe.txt");
zip.Save("MyZipFile.zip");
}
В этом примере MyZipFile.zip хранится в папке «C: \ Program Files (x86) \ IIS Express», я не могу найти простых примеров в сети. Есть ли способ изменить этот путь? Я сомневаюсь, что у меня есть разрешение на посещение моего веб-хостинга.