Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to 4.0.0 #49

Open
xnerhu opened this issue Jul 1, 2020 · 0 comments
Open

Migration to 4.0.0 #49

xnerhu opened this issue Jul 1, 2020 · 0 comments

Comments

@xnerhu
Copy link
Member

xnerhu commented Jul 1, 2020

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.
@xnerhu xnerhu pinned this issue Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant