Method FTPClient2():setOption() Foundation

Sets client options.

Syntax
:setOption( <cMode>, <xSetting> ) --> self
Parameters
<cMode>
The name of the option to set.
<xSetting>
The new value for the option.
Return

This method returns self.

Description

Configures various options for the FTP client. Available options:

"secure-connection": FTPClient2 instances use secure connections by default. Set the value to "off" to connect to servers that do not support SSL/TLS security features. All other values cause secure connections to be enabled.

"ignore-cert-error": This option controls certificate validation behavior during SSL/TLS connections. By default, the connection is aborted if the server uses an invalid SSL certificate. Setting this option to "ignore-all" allows the connection to be established even if the server's certificate does not meet security requirements. While this can be useful during development or testing with self-signed certificates, bypassing certificate validation is not recommended in production environments as it reduces security.

Unknown options are silently ignored.

Feedback

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.