Method SFTPClient():new() Foundation
Initializes a new SFTP client instance.
:new( <cUrl>, <cUsername>, [<cPassword>], [<cProxyUrl>] ) --> self
This method returns self.
Creates and initializes a new SFTP client instance for connecting to the specified server. To do this, this method requires the server URL and the credentials for user authentication to be specified.
Two different authentication methods are supported: via username and password or using public key authentication using a key file. In the latter case, the <cPassword> parameter is ignored. Instead, the :setKeyFile() method must be used to specify the key file used for authentication.
After creating the instance, you can configure SSH authentication using :setKeyFile() or :setKnownHostsFile() before establishing the connection with :connect().
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.