I inherited some code that ZipArchive uses to store some information from a database. To do this, use BinaryFormatter. When you look at a zip file with 7-zip (for example), you see a couple of folders and a .txt file. Everything works well. I just want to change the code to also have a folder in ZipArchive called "temp", which consists of files and folders under C: \ temp. Is there an easy way to add an entry (ZipArchiveEntry?) Consisting of an entire folder or disk? I saw "CreateEntryFromFile" in the methods of the ZipArchive members, but not CreateEntryFromDirectory. Or maybe there is another easy way to do this? Does anyone have some sample code? I have to say that C: \ temp can have a variable number of files and directories (having child directories and files, etc.). Do I have to list them somehow, create my own directories using CreateEntryFromFile? Any help is appreciated.
Similarly, when I read ZipArchive, I want to take material related to C: \ temp and just upload it to a directory (like C: \ temp_old) Thanks, Dave
Dave Apr 26 '16 at 17:50 2016-04-26 17:50
source share