Re: [JSch-users] How to know the "type" of file transfer error?
Status: Alpha
Brought to you by:
ymnk
From: <ym...@jc...> - 2011-09-30 07:40:56
|
Hi, +-From: Gustavo <gus...@gm...> ----- |_Date: Wed, 28 Sep 2011 16:36:16 -0300 __ | |i'm using "ChannelSftp.put(src, dst)" to send a file over ssh. ... |My question arises because in the second case one could think about catching |that error and retrying but now with the option RESUME: " |ChannelSftp.put(src, dst, ChannelSftp.RESUME)" so avoiding to send the |entire file again. For your purpose, you may be able to use SftpProgressMonitor, ChannelSftp#put(String src, String dst, SftpProgressMonitor monitor) If SftpProgressMonitor#count is invoked, but SftpProgressMonitor#end is not, that means the file has not been uploaded completely. 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 |