[
  {
    "Id": "535561",
    "ThreadId": "238322",
    "Html": "\r\n<p>Hi,<br>\r\nin the library I've found the method addFile in which is possibile to add a file in a specific&nbsp;directory path of the archive.</p>\r\n<p>For my purposes, I have to use the other method addEntry: how could I add files with this method in a created directory (addDirectoryByName)?</p>\r\n<p>Thank you,<br>\r\nElena</p>\r\n",
    "PostedDate": "2010-12-14T06:39:05.82-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "537437",
    "ThreadId": "238322",
    "Html": "\r\n<p>Elena, you can use</p>\r\n<p>ZipFile.AddFile(string fileNameOnDisk, string directoryPathInArchive).</p>\r\n<p>The second string parameter specifies the directory within the zip archive, to use for the zipentry after it is added.</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-12-17T10:56:20.743-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "538315",
    "ThreadId": "238322",
    "Html": "\r\n<p>Hi Cheeso,<br>\r\nI've already found that method but it isn't good for my purposes (I think) because I don't write the file on disk: I have to use a stream.</p>\r\n<p>For this reason now I use addEntry method, but with this method I cannot specify the directory... I zip all the files in the root directory, but it isn't so good.</p>\r\n<p>Do I miss something or do something wrong?!</p>\r\n<p>&nbsp;</p>\r\n<p>Thanx for your attention,</p>\r\n<p>Elena</p>\r\n",
    "PostedDate": "2010-12-20T08:09:53.08-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "538763",
    "ThreadId": "238322",
    "Html": "\r\n<p>yes, I see.</p>\r\n<p>If you use the ZipFile.AddEntry() set of methods, you specify the full path to use for the entry within the zip archive, as the entryName parameter.&nbsp; There must be two&nbsp;filename parameters in the ZipFile.AddFile() methods, because a user may wish\r\n to read from a file at one location on the source filesystem, and then use a different name for the entry name within the zip archive.&nbsp; No such requirement exists when not using a file as the source of the entry data, as is the case for you.&nbsp; There\r\n is only one name you need to specify: the name used for the entry within the zip archive.</p>\r\n<p>If you read <a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/7bc513f6-c21c-6a02-3964-f2a571308a33.htm\">\r\nthe reference documentation for ZipFile.AddEntry(string,stream)</a> you'll see it describes the entryName parameter as</p>\r\n<dd>&quot; The name, including any path, which is shown in the zip file for the added entry. &quot;\r\n<p>Does this help?</p>\r\n</dd>",
    "PostedDate": "2010-12-21T07:02:32.65-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "540216",
    "ThreadId": "238322",
    "Html": "\r\n<p>Hi Cheeso, it's very helpful!</p>\r\n<p>Thank you very much, now I solved my problem!!!</p>\r\n",
    "PostedDate": "2010-12-24T02:26:00.083-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]