This repository was archived by the owner on Feb 5, 2022. It is now read-only.
This repository was archived by the owner on Feb 5, 2022. It is now read-only.
Bytes transfered event in download method #43
Open
Description
Not sure if there is anyway to do this currently and if so let me know.
I am looking for a way to setup a listener on the client to capture, on an interval, the progress of the file being downloaded.
Example:
client = new Scp2.Client config
client.on 'transfer', (bytes) ->
Logger.verbose "Bytes transfered (#{localFile}): #{bytes}"
client.download remoteFile, localFile, (error) ->
callback error, localFile
The only place that the 'transfer' event is currently emitted is in the Client.write method.
I made a Gist with some minor updates to Client.prototype.download
to emit this.
Any comments/thoughts?
https://gist.github.com/charlietilt/8d6c64b50ebf688b47e1
Metadata
Metadata
Assignees
Labels
No labels