[
  {
    "Id": "289864",
    "ThreadId": "85047",
    "Html": "<p>Hi all,</p>\r\n<p>Just wondering if the current 1.9.1.3 support symbolic link feature? I am currently using the .AddSelectedFiles() method and then .Save method to zip up all contains inside a folder. If symbolic link feature support, how do I active it. I looked in the documentation but haven't found anything for that yet.</p>\r\n<p>Thank you,</p>\r\n<p>&nbsp;</p>\r\n<p>Hugh</p>",
    "PostedDate": "2010-02-11T14:04:31.47-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "289938",
    "ThreadId": "85047",
    "Html": "<p>Yes,</p>\r\n<p>There's a property on the ZipFile class called AddDirectoryWillTraverseReparsePoints, which governs the behavior.&nbsp; By default it is False, meaning your AddSelectedFiles will not traverse reparse points (or symbolic links).&nbsp; If you set it to True, then your call to AddSelectedFiles will traverse reparse points.&nbsp;</p>\r\n<p>The documentation is here: <a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/99c2673a-65ee-cf82-3fc6-506ed582a7ca.htm\">http://cheeso.members.winisp.net/DotNetZipHelp/html/99c2673a-65ee-cf82-3fc6-506ed582a7ca.htm</a></p>\r\n<p>You need at least version 1.9.1.1 to get this feature.</p>",
    "PostedDate": "2010-02-11T18:11:12.953-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "290152",
    "ThreadId": "85047",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>Thank you for the quick reply. That's great. I guess this is the NTFS limitation and nothing we can do because the Symbolic Link feature only for directory but not for individual file like Unix version.</p>\r\n<p>&nbsp;</p>\r\n<p>Hugh</p>",
    "PostedDate": "2010-02-12T08:00:31.23-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "290330",
    "ThreadId": "85047",
    "Html": "<p>I misunderstood.&nbsp; The NTFS supports the idea of a &quot;reparse point&quot;, for either a file or a directory.&nbsp;&nbsp; For a directory, a reparse point is also known as a &quot;junction&quot;, and traversing those structures is what is governed by the <strong>AddDirectoryWillTraverseReparsePoints </strong>property<strong>.&nbsp; </strong>I thought you were asking about directory reparse points.</p>\r\n<p>A reparse point for a file is a symlink, an it behaves much like a Unix fs symlink.&nbsp;&nbsp; <a href=\"http://en.wikipedia.org/wiki/NTFS_symbolic_link\">http://en.wikipedia.org/wiki/NTFS_symbolic_link</a></p>\r\n<p>You asked about &quot;symbolic link feature support&quot;.&nbsp;&nbsp; Exactly what did you have in mind?&nbsp; Currently the AddSelectedFiles() method will follow all symlinks for files.&nbsp; &nbsp;Would you like this behavior to be modifiable?&nbsp; Please describe what you would like to see, for &quot;symbolic link feature support&quot;.</p>",
    "PostedDate": "2010-02-12T14:36:42.547-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "290655",
    "ThreadId": "85047",
    "Html": "<p>But NTFS supports both reparse points (junctions, supported by XP+) and symbolic links (supported by Vista+). Is AddDirectoryWillTraverseReparsePoints method working for both symlinks and junctions?</p>",
    "PostedDate": "2010-02-14T13:15:54.047-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "290679",
    "ThreadId": "85047",
    "Html": "<p>&gt; But NTFS supports both reparse points (junctions, supported by XP+) and symbolic links</p>\r\n<p>Yes, I understand that NTFS supports symlinks.&nbsp; As I wrote above, a reparse point on a file is a symlink.&nbsp; Your statement implies that symlinks are not reparse points, but that's not true.</p>\r\n<p>&gt; Is AddDirectoryWillTraverseReparsePoints method working for both symlinks and junctions?</p>\r\n<p>No, Craccoon.</p>\r\n<p>As I said above, <strong><em>Currently the AddSelectedFiles() method will follow all symlinks for files.</em></strong></p>\r\n<p>I propose to extend the selection criteria to include the ability to distinguish between regular files and symbolic links.&nbsp; Specifically I'll use the attributes noun&nbsp;&nbsp;and I'll add another letter: L for symbolic link.&nbsp; The set of attributes will be H,R,S,A,I,L.&nbsp; For Hidden, Readonly, System, Archive, NotContentIndexed and Link.</p>\r\n<p>So you will be able to call AddSelectedFiles() with selection criteria like &quot;attributes = L&quot; to add only files that are symbolic links, or <br>&quot;attributes != L&quot; to add files that are not symbolic links.&nbsp;</p>\r\n<p>This is what I propose to do.&nbsp; It's not in the library yet.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-02-14T15:15:21.45-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "290682",
    "ThreadId": "85047",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=10197\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-02-14T15:48:18.833-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "292854",
    "ThreadId": "85047",
    "Html": "<blockquote style=\"border:solid .1em #ccc;font-style:italic;margin:.25em 1em 0 1em;padding:0 .25em 0 .25em\"><strong>Cheeso wrote:</strong><br>\r\n<p>I misunderstood.&nbsp; The NTFS supports the idea of a &quot;reparse point&quot;, for either a file or a directory.&nbsp;&nbsp; For a directory, a reparse point is also known as a &quot;junction&quot;, and traversing those structures is what is governed by the <strong>AddDirectoryWillTraverseReparsePoints </strong>property<strong>.&nbsp; </strong>I thought you were asking about directory reparse points.</p>\r\n<p>A reparse point for a file is a symlink, an it behaves much like a Unix fs symlink.&nbsp;&nbsp; <a href=\"http://en.wikipedia.org/wiki/NTFS_symbolic_link\">http://en.wikipedia.org/wiki/NTFS_symbolic_link</a></p>\r\n<p>You asked about &quot;symbolic link feature support&quot;.&nbsp;&nbsp; Exactly what did you have in mind?&nbsp; Currently the AddSelectedFiles() method will follow all symlinks for files.&nbsp; &nbsp;Would you like this behavior to be modifiable?&nbsp; Please describe what you would like to see, for &quot;symbolic link feature support&quot;.</p>\r\n</blockquote>\r\n<p>Sorry, for the slow response I was out for the past few days. What I am after is the way to preserve the symlink from unix environment.&nbsp;</p>\r\n<p>Ex: let say I have 3 files that suppose to be identical to each other named file1.txt, file2.txt and file3.txt. When I make modification to either of the file listed, all the other one are changed as well. So I only need to modify 1 file and all 3 files that symbolic link to each other get change.&nbsp;</p>\r\n<p>For whatever reason, when I put the source files on a windows machine, the symlink got remove and those 3 files are no longer linked together. Change 1 file will effect any other file that original linked together.</p>",
    "PostedDate": "2010-02-19T14:13:02.357-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "292864",
    "ThreadId": "85047",
    "Html": "<p>I understand what a symlink is.&nbsp;</p>\r\n<p>I don't know what you mean by &quot;put the source files on the windows machine&quot; .</p>\r\n<p>Also, I didn't see any mention of a zip file anywhere in your description.&nbsp; Here's the thing: a zip file cannot store a symlink.&nbsp; It stores files or directories.&nbsp; There is no possibility to store a symlink in a zip file.&nbsp; The format does not handle it.&nbsp;&nbsp; If you want symlinks, then consider a different archive format, one that <em>can </em>store a symlink, like TAR.&nbsp; But if you choose TAR, you need the right TAR tool or library in order to unpack the symlink as a symlink.&nbsp; Not all tar tools handle symlinks.&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-02-19T14:52:00.34-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]