{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "implemented in changeset 29670.  This feature is first available in v1.8.0.15.",
    "ClosedDate": "2009-03-02T00:01:55.95-08:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "Requirements: \n \n1. filter by pathname. Would like to be able to add all *.doc files or all *.jpg files, etc.    Or exclude all .mp3 files, etc\n2. filter by ctime,atime,mtime \n3. filter by file attributes (hidden, readonly, system, archive)\n4. should apply to Add() ad to Extract() actions\n5. The interface should be simple and easy to use. \n \nAre these the right requirements?\n \nConsidering the requirements, I'm leaning toward using a boolean expression, encoded in a string, to describe the criteria.  Some sample expressions: \n \n \"name = *.txt\"         ==>  All .txt files\n \"name = *.jpg    OR    name = *.gif\"        ==>  Any .jpg or .gif file\n \"size > 10000   AND   attributes != R\"     ==>  filesize larger than 10000 bytes and NOT ReadOnly\n \"size != 0   AND    mtime > 2009-02-17\"   ==> any file of non-zero length that has been modified after 17 February 2009\n \nDotNetZip would parse this string expression into a model, and then apply it to a directory, either recursively or not at the caller's option.   This approach seems flexible and general, and at the same time, easy to use.\n \nI've got a prototype of this working at the moment, applying the filter to on-disk files.  Nearly there.  There is one big outstanding issue:  need to support the use of parenthesis in the expression.  \"A OR (B and C) OR (D and E)\".    That is coming along. \n \nThe interface change to DotNetZip would include new methods on the ZipFile class: \n - a new overload of AddDirectory().  It would accept 3 strings: the directory path on disk, the directory name to use in the archive (possibly null), and the third arg is the filter expression. \n - a new method,  void ExtractSelectedFiles(string FilterExpression), that would extract only those entries/files that satisfy the filter expression. \n - a new method,  ZipEntry[] GetEntries(string FilterExpression), that would return an array of entries of files in the archive, that satisfy the filter expression. \n - a new method,  static String[] GetFiles(string FilterExpression), that would return an array of files on disk that satisfy the filter expression. \n \nPlease do comment about the proposed interface.",
    "LastUpdatedDate": "2013-05-16T05:32:31.337-07:00",
    "PlannedForRelease": "1.8 DotNetZip",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-02-11T21:35:50.82-08:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "File filter support for including or excluding files when calling AddXxx() and Extract()",
    "Type": {
      "Name": "Feature",
      "Id": 1
    },
    "VoteCount": 3,
    "Id": 7072
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Wildcard or regexp pattern, as you want.",
      "PostedDate": "2009-02-20T02:10:36.117-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-02-25T07:27:34.83-08:00",
      "Id": -2147483648
    },
    {
      "Message": "This would appear to be along the same lines, but wildcard support for exceptions. On the AddDirectory method maybe:\r\nAddDirectory(directoryname as string, directorypathinarchive as string, filestoexclude as string)\r\nor\r\nAddDirectory(directoryname as string, directorypathinarchive as string, filestoexclude as string, filestoinclude as string)\r\nWhere filestoinclude/filestoexclude could be code that says <file/item.beginswith(\" \")> or <file/items.endswith(\" \")> or file extension.\r\n\r\nI could REALLY use that...\r\n",
      "PostedDate": "2009-02-25T07:36:35.2-08:00",
      "Id": -2147483648
    },
    {
      "Message": "About regexp - I can see that would be a powerful pattern matching approach.  One concern - would it be usable broadly?  I mean, the regexp language is pretty baroque, and sort of a specialty.  It's also different from \"normal\" wildcard matching, as in Directory.GetFiles.   And, thinking about this further, regexp or pattern matching on the filename isn't the complete answer.  People might want to include files based on the file size, or the last mod time (or created time, or last accessed time), or the file attributes (hidden, readonly, etc), or some other property of the file. ",
      "PostedDate": "2009-02-25T08:56:24.38-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-02-25T09:14:10.583-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-02-25T09:23:44.92-08:00",
      "Id": -2147483648
    },
    {
      "Message": "The current design I am working on allows you to specify a boolean logic expression in a string, to describe which files to include, and optionally a similar expression to describe the files to exclude.  You can apply criteria like filename, filesize, file timestamp, and attributes.  I'm interested in feedback!\r\n",
      "PostedDate": "2009-02-27T12:46:28.983-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-02-27T12:49:25.467-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-02-27T13:02:37.677-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-02-27T14:05:21.283-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-03-02T00:01:55.95-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:30.53-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:31.337-07:00",
      "Id": -2147483648
    }
  ]
}