constructor ({
    remotePath,
    localPath,
    options = {},
    id,
    type = 'download',
    sftp,
    sftpId,
    ws
  }) {
    this.id = id
    this.ftpClient = sftp
    this.srcPath = type === 'download' ? remotePath : localPath
    this.dstPath = type === 'download' ? localPath : remotePath
    this.isUpload = type !== 'download'
    this.ws = ws
    this.pausing = false
    this.onDestroy = false
    this.total = 0
    this.src = type === 'download' ? sftp : null
    this.dst = type === 'download' ? null : sftp
    this.start()
  }
ftp transfer class
Note: basic-ftp only supports one active transfer per client connection