Back to FtpClient class

Method quit

public bool
quit
()
Method to quit and close the connection
Returns
  • bool True if successful
Since
  • 1.5
Class: FtpClient
Project: Joomla

Method quit - Source code

/**
 * Method to quit and close the connection
 *
 * @return  boolean  True if successful
 *
 * @since   1.5
 */
public function quit()
{
    // If native FTP support is enabled lets use it...
    if (FTP_NATIVE) {
        @ftp_close($this->_conn);
        return true;
    }
    // Logout and close connection
    @fwrite($this->_conn, "QUIT\r\n");
    @fclose($this->_conn);
    return true;
}