public function cd($directory = null)
    {
        if (\ftp_chdir($this->_stream, $directory)) {
            return true;
        }

        $this->error = "Failed to change directory to \"{$directory}\"";

        return false;
    }
public function cd($directory = null)
    {
        if (\ftp_chdir($this->_stream, $directory)) {
            return true;
        }

        $this->error = "Failed to change directory to \"{$directory}\"";

        return false;
    }
public function cd ( $ directory = null ) { if ( \ ftp_chdir ( $ this -> _stream , $ directory ) ) { return true ; } $ this -> error = "Failed to change directory to \"{$directory}\"" ; return false ; }
Change current directory on FTP server

@param string $directory

@return bool
Change current directory on FTP server