spmjs / node-scp2

[MAINTAINER WANTED] A pure javascript scp program based on ssh2.
384 stars 96 forks source link

Emit transfer event during download #44

Closed charlietilt closed 8 years ago

charlietilt commented 8 years ago

Summary

updated the client download method to emit a transfer event on an interval with the amount transfered thus far.

Example:

client = new Scp2.Client config
    client.on 'transfer', (buffer, bytes, totalBytes) ->
      console.log "Total Bytes transfered (#{localFile}): #{totalBytes}"
    client.download remoteFile, localFile, (error) ->
      callback error, localFile
popomore commented 8 years ago

Same as #61?

charlietilt commented 8 years ago

Agree, same features as in #61

popomore commented 8 years ago

And I'll close this.