Skip to content

FTPClient » IsConnected

Returns true if the client has successfully connected or false otherwise.

js
client.IsConnected();

Example

js
let client = ftp.Connect(
    "sftp", 
    "example.domain.com", 
    22, 
    "brad", 
    "password"
);

let connected = client.IsConnected(); 
if (connected) { 
    script.log('Connection successful'); 
}