Camel
  1. Camel
  2. CAMEL-4602

file/ftp consumer - The filter option should be able to work on directories as well

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      See nabble
      http://camel.465427.n5.nabble.com/Copying-files-from-an-FTP-server-using-search-criteria-tp4882889p4882889.html

      By invoking the filter for directories, it allows end users to skip entire directories, which would make the polling faster. And no need to walk down unwanted directories.

      The logic need to apply for both file/ftp consumers, as well having unit tests to ensure it works.

        Activity

        Hide
        Michał Warecki added a comment -

        Your solution is much better. I have a lot to learn about non-business projects. Claus, thanks for the very valuable lesson.

        Show
        Michał Warecki added a comment - Your solution is much better. I have a lot to learn about non-business projects. Claus, thanks for the very valuable lesson.
        Hide
        Claus Ibsen added a comment -

        Thanks Michael for the patch.

        I went ahead and added a isDirectory method on GenericFile, this avoids any API breakings in the filter interface.

        Show
        Claus Ibsen added a comment - Thanks Michael for the patch. I went ahead and added a isDirectory method on GenericFile, this avoids any API breakings in the filter interface.
        Hide
        Michał Warecki added a comment -

        Hi, I attached possible solution with unit test.

        Show
        Michał Warecki added a comment - Hi, I attached possible solution with unit test.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development