diff --git a/src/FtpClient.php b/src/FtpClient.php index 853555f..8f26e43 100644 --- a/src/FtpClient.php +++ b/src/FtpClient.php @@ -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. *