[ 
https://issues.apache.org/jira/browse/CAMEL-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025052#comment-13025052
 ] 

Jesus CASTILLO commented on CAMEL-3894:
---------------------------------------

I like the find command as we can build complex searches with a few options. 
Both mindepth and maxdepth allows us to limit the search when traversing the 
directories tree. So, both are important although I think that maxdepth is more 
frequently used. In addition, I think wee need a filter that supports find 
style searches. I am running some test to locate all the Outbox folders in the 
following structure:

{code}
repositories
+ repo1
  + users
    + user1
      + Incoming
      + Inbox
      + Outbox
      + Sent Files
      + Deleted Files
    + user2
    ...
    + userN
+ repo2
...
+ repoM
{code}  

but it's hard to implement it efficiently using only the Ant filter. This could 
be easily done with a find command as:

{code}
find ./repositories -mindepth 4 -maxdepth 4 -type d -name Outbox
{code}

A find-like filter could have support for filetype (directory/file), filter 
with times (mtime, ctime, etc), permissions, etc.



> Support maxdepth option on File Component when recursive option is enabled
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-3894
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3894
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.6.0
>            Reporter: Jesus CASTILLO
>
> It would be great if the File component adds support for the maxdepth option 
> just like the find command does, so we can prune the recursive directory 
> search when recursive is enabled.
> With maxdepth we can set the levels of Directories to descend during the 
> pollDirectory function.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to