This is a guide for migrating to v4.0.0. This version introduces a lot of breaking changes since v2.6.0.
Documentation:
Breaking changes
Client
Client.abort()
- Now aborts all tasks.
- To abort a transfer use
Client.abortTransfer().
Client.connect(config, options)
Client.connected
Client.createBlank()
Client.delete()
- Removed, because in some protocols, there is no way to check if path is a folder or a file.
`Client.download(remotePath, dest, options)
- Switched the order of
dest and remotePath arguments.
- Changed
options to startAt (number).
Client.isSftp
Client.mkdir()
- Changed to
Client.createFolder.
Client.protocol
- Removed. You can access this by
Client.config.protocol.
Client.readDir()
Client.rimraf()
- Changed to
Client.removeFolder.
Client.stat()
Client.touch()
- Changed to
Client.createEmptyFile.
Client.unlink()
- Changed to
Client.removeFile.
`Client.upload(remotePath, source, options)
- Switched the order of
source and remotePath arguments.
- Removed
options argument.
Event connected
Event disconnected
- Changed to
disconnect. Emitted everytime a connection is closed.
Event abort
- Changed to
transfer-abort. Emitted everytime some transfers are aborted.
Event progress
ConcurrentClient
Interface IConfig
- Because of the ability to register custom protocols, this interface consists only of generic options. If you want to use interface
for ftp protocols, check this.
This is a guide for migrating to
v4.0.0. This version introduces a lot of breaking changes sincev2.6.0.Documentation:
v4.x.yv2.6.0Breaking changes
ClientClient.abort()Client.abortTransfer().Client.connect(config, options)Client.connectedClient.createBlank()Client.delete()`Client.download(remotePath, dest, options)
destandremotePatharguments.optionstostartAt(number).Client.isSftpClient.mkdir()Client.createFolder.Client.protocolClient.config.protocol.Client.readDir()Client.list.Client.rimraf()Client.removeFolder.Client.stat()Client.touch()Client.createEmptyFile.Client.unlink()Client.removeFile.`Client.upload(remotePath, source, options)
sourceandremotePatharguments.optionsargument.Event
connectedconnect.Event
disconnecteddisconnect. Emitted everytime a connection is closed.Event
aborttransfer-abort. Emitted everytime some transfers are aborted.Event
progresstransfer-progress. See listener options.ConcurrentClientoptionstoClient.constructor.Interface
IConfigfor ftp protocols, check this.