Hi I am trying to use mkdir. Is there way to check if dir already exist?

Is this the only way? or else any elegant solution?
try {
      sftpChannel.mkdir(dir);

    }catch (SftpException e) {
      if(e.id== ChannelSftp.SSH_FX_FAILURE){
        theLog.log(PositLog.LOG_LEVEL_ERROR,"Dir may already exist "+dir);
      }
      else
        ....

THanks

Manju
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to