Class: FunSftp::UploadCallbacks

Inherits:
Object
  • Object
show all
Defined in:
lib/fun_sftp/upload_callbacks.rb

Instance Method Summary collapse

Instance Method Details

#on_close(uploader, file) ⇒ Object



11
12
13
# File 'lib/fun_sftp/upload_callbacks.rb', line 11

def on_close(uploader, file)
  FunSftp.logger.info "finished with #{file.remote}"
end

#on_finish(uploader) ⇒ Object



19
20
21
# File 'lib/fun_sftp/upload_callbacks.rb', line 19

def on_finish(uploader)
  FunSftp.logger.info "all done!"
end

#on_mkdir(uploader, path) ⇒ Object



15
16
17
# File 'lib/fun_sftp/upload_callbacks.rb', line 15

def on_mkdir(uploader, path)
  FunSftp.logger.info "creating directory #{path}"
end

#on_open(uploader, file) ⇒ Object



3
4
5
# File 'lib/fun_sftp/upload_callbacks.rb', line 3

def on_open(uploader, file)
  FunSftp.logger.info "starting upload: #{file.local} -> #{file.remote} (#{file.size} bytes)"
end

#on_put(uploader, file, offset, data) ⇒ Object



7
8
9
# File 'lib/fun_sftp/upload_callbacks.rb', line 7

def on_put(uploader, file, offset, data)
  FunSftp.logger.info "writing #{data.length} bytes to #{file.remote} starting at #{offset}"
end