camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marekni <>
Subject Re: FTP component enhancement suggestion
Date Fri, 12 Aug 2011 12:33:47 GMT

In my test method for SFTP server takes more less the same
time like
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 {
            return false;
        } catch (SftpException e) {
            if (ChannelSftp.SSH_FX_NO_SUCH_FILE == {
                return false;
            return true;

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message