[
  {
    "Id": "193064",
    "ThreadId": "57140",
    "Html": "<p>Cheeso,</p>\r\n<p>Why didn't you implement the ability to define whether one can overwrite an existing zip when creating or saving a zip?</p>\r\n<p>For example, it would nice if one could do the following:</p>\r\n<p style=\"padding-left:30px\">ZipFile zip = new ZipFile(&quot;zipFileName&quot;, false);&nbsp;&nbsp;&nbsp; // where TRUE=OverWriteExistingFile</p>\r\n<p>or in the Save method:</p>\r\n<p style=\"padding-left:30px\">zip.Save(&quot;zipFileName&quot;, false);</p>\r\n<p>As it stands now, one has to add code to check whether to use</p>\r\n<p style=\"padding-left:30px\">ZipFile zip = new ZipFile(&quot;ZipFileName&quot;);</p>\r\n<p>or</p>\r\n<p style=\"padding-left:30px\">ZipFile zip = ZipFile.Read(&quot;zipFileName&quot;);</p>\r\n<p>&nbsp;</p>\r\n<p>Just curious, thanks.</p>\r\n<p>--Lenard</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-05-21T21:23:53.613-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "193249",
    "ThreadId": "57140",
    "Html": "<p>Hey, Lenard.&nbsp; Good question.</p>\r\n<p>As it stands now, <span style=\"font-family:Courier;font-size:10pt\">var zip = new ZipFile(&quot;Archive.zip&quot;)</span> will succeed whether or not the file Archive.zip exists.</p>\r\n<p>If the file exists, then it will be read in, just as with&nbsp;ZipFile.Read().&nbsp; If the file does not exist, then it will be created upon Save().</p>\r\n<p>If you want to always overwrite and never read-in&nbsp;the existing zipfile, then use the default ctor, and specify the path in the call to Save().&nbsp; Like so:</p>\r\n<pre>using (var zip = new ZipFile())\r\n{\r\n   zip.AddFile(&quot;Foo.txt&quot;, &quot;&quot;);\r\n   zip.Save(&quot;ThisFileWillAlwaysBeOverwritten.zip&quot;); \r\n}\r\n</pre>\r\n<p>I think it's a reasonable thing to ask that there be an overwrite flag in the call to&nbsp;Save(). In that case you would get something like this: &nbsp;</p>\r\n<pre>using (var zip = new ZipFile())\r\n{\r\n   zip.AddFile(&quot;Foo.txt&quot;, &quot;&quot;);\r\n   zip.Save(&quot;NeverOverwrite.zip&quot;, false); // false = throw on existing file\r\n}\r\n</pre>\r\n<p>...&nbsp;</p>",
    "PostedDate": "2009-05-22T08:01:32.233-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "193251",
    "ThreadId": "57140",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=7802\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2009-05-22T08:03:32.207-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "193265",
    "ThreadId": "57140",
    "Html": "<p>Cheeso,</p>\r\n<p>Great!&nbsp; I didn't realize that <span style=\"font-family:Courier;font-size:10pt\">var zip = new ZipFile(&quot;Archive.zip&quot;)</span>did that.&nbsp; That will work for me.</p>\r\n<p>Thanks.</p>\r\n<p>--Lenard</p>",
    "PostedDate": "2009-05-22T08:26:52.407-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]