[ https://issues.apache.org/jira/browse/CAMEL-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-6009. -------------------------------- Resolution: Later Assignee: Claus Ibsen > camel-ftp - Improved logic for traversing directories with stepwise enabled > --------------------------------------------------------------------------- > > Key: CAMEL-6009 > URL: https://issues.apache.org/jira/browse/CAMEL-6009 > Project: Camel > Issue Type: Improvement > Components: camel-ftp > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Fix For: Future > > > See CAMEL-5574 with some comments > The logic how Camel does recursive directory scanning on FTP components could > be improved. In some cases it does a fair bit of directory changes. And also > the logic for going to parent dir, could be improved for SFTP to use cd .. > instead. > Thought its in the fist poll we can really improve as well. What we should do > is to at first poll to CD into the starting directory, only once. > And then the existing logic can traverse the dirs, and when its done, the > current dir is at the starting dir. > Then we dont need to remember the beginning dir, and then change back to that > when the poll is complete. > eg we just CD into the starting dir the 1st time, and dont do that for 2+ > polls. > For that we need to have a state to remember this. And also if we need to > re-login etc, then that state must be cleared. > So 2 optimizes > 1) How we do changeToParentDirectory > 2) CD to starting directory on 1st poll (need state to remember) > PS: starting directory = then directory configured on the ftp endpoint. > Sometimes it may not be configured if you should just start from the "home" > directory. -- This message was sent by Atlassian JIRA (v6.3.4#6332)