[
https://issues.apache.org/jira/browse/CAMEL-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435824#comment-13435824
]
Claus Ibsen commented on CAMEL-5512:
------------------------------------
he regular FTP client now has a improved API so we can possible improve on that
client
{code}
public FTPFile[] listFiles(String pathname, FTPFileFilter filter)
{code}
There is a filter, so we can then filter, to only get details about the file in
question.
As well there is a modification timestamp command (not supported by all servers)
{code}
public String getModificationTime(String pathname) throws IOException {
{code}
Also looks like the SFTP library now have a filter API in their newer version
{code}
public void ls(java.lang.String path,
com.jcraft.jsch.ChannelSftp.LsEntrySelector selector) throws
com.jcraft.jsch.SftpException {code}
So we should possible be able to optimize this if these list operations is
faster.
> camel-ftp - Improve readlock changed to use fine grained API to get file
> details
> --------------------------------------------------------------------------------
>
> Key: CAMEL-5512
> URL: https://issues.apache.org/jira/browse/CAMEL-5512
> Project: Camel
> Issue Type: Improvement
> Components: camel-ftp
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.11.0
>
>
> If you have a dir with a lot of files, then we are currently doing a LS each
> time.
> We should try to use the fine grained API from the ftp clients to get file
> size / timestamp when applicable.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira