Skip to content

Migration to 4.0.0 #49

Description

@xnerhu

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

  • Removed.

Client.createBlank()

  • Removed.

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

  • Removed.

Client.mkdir()

  • Changed to Client.createFolder.

Client.protocol

  • Removed. You can access this by Client.config.protocol.

Client.readDir()

  • Changed to Client.list.

Client.rimraf()

  • Changed to Client.removeFolder.

Client.stat()

  • Removed.

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

  • Changed to connect.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions