Hi, +-From: "Manju 'Manny' Bhat" <manj...@gmail.com> -- |_Date: Wed, 29 Jun 2011 19:13:19 -0400 ___________ | |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 .... How about using sftpChannel.stat(dir) ? Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk Facebook: http://facebook.com/aymnk ------------------------------------------------------------------------------ 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