Skip to content

Commit

Permalink
Add FtpClient::isConnected()
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Oct 16, 2019
1 parent 9ef062c commit aa3b848
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/FtpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ public function close() : void
$this->conn = null;
}

/**
* Returns whether a connection is currently open.
*
* @return bool
*/
public function isConnected() : bool
{
return $this->conn !== null;
}

/**
* Logs in to the FTP connection.
*
Expand Down

0 comments on commit aa3b848

Please sign in to comment.