connectSFTP()
Connects to the SFTP server.It is not mandatory to call this method before calling any SFTP method. The library will automatically establish an SFTP connection when needed.
Signature
Parameters
Optional callback function to be called after the connection is established.
Returns
A promise that resolves when the connection is established successfully, or rejects with an error if the connection fails.
Example
disconnectSFTP()
Disconnects the SFTP connection.Signature
Parameters
NoneReturns
This method does not return a value.
Example
Platform Notes
- Android: Fully supported. Explicitly closes the SFTP channel.
- iOS: The SFTP stream will be closed when
disconnect()is called on the SSH client.