Class: XFTP::Session::SFTP::ProgressHandler Private

Inherits:
Object
  • Object
show all
Includes:
Helpers::Logging
Defined in:
lib/xftp/session/sftp.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Helper class for progress monitoring

Instance Method Summary collapse

Methods included from Helpers::Logging

#log

Instance Method Details

#on_close(_downloader, file) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
# File 'lib/xftp/session/sftp.rb', line 23

def on_close(_downloader, file)
  log "finished with #{file.remote}"
end

#on_finish(_downloader) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/xftp/session/sftp.rb', line 31

def on_finish(_downloader)
  log 'done'
end

#on_get(_downloader, file, offset, data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19
20
21
# File 'lib/xftp/session/sftp.rb', line 19

def on_get(_downloader, file, offset, data)
  log "writing #{data.length} bytes to #{file.local} starting at #{offset}"
end

#on_mkdir(_downloader, path) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
# File 'lib/xftp/session/sftp.rb', line 27

def on_mkdir(_downloader, path)
  log "creating directory #{path}"
end

#on_open(_downloader, file) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
# File 'lib/xftp/session/sftp.rb', line 15

def on_open(_downloader, file)
  log "starting download: #{file.remote} -> #{file.local} (#{file.size} bytes)"
end