Hi, In my test method channel.ls(name) for SFTP server takes more less the same time like channel.ls() The quickest way is to do this in less elegant i think. I f you want to know if file exist just try to make directory with the same name and look for results. It require to have write permission on destination folder but in most cases if we want to store messages such permission we already have.
public boolean existsFile(String name) throws GenericFileOperationFailedException { if (LOG.isTraceEnabled()) { LOG.trace("existsFile(" + name + ")"); } try { channel.mkdir(name); channel.rmdir(name); return false; } catch (SftpException e) { if (ChannelSftp.SSH_FX_NO_SUCH_FILE == e.id) { return false; } return true; } } -- View this message in context: http://camel.465427.n5.nabble.com/FTP-component-enhancement-suggestion-tp4692606p4693115.html Sent from the Camel Development mailing list archive at Nabble.com.