public function changeDirectory($directory)
    {
        $result = @ftp_chdir($this->connection, $directory);
        
        if ($result === false) {
            throw new Exception('Unable to change directory');
        }

        return $this;
    }
public function changeDirectory($directory)
    {
        $result = @ftp_chdir($this->connection, $directory);
        
        if ($result === false) {
            throw new Exception('Unable to change directory');
        }

        return $this;
    }
public function changeDirectory ( $ directory ) { $ result = @ ftp_chdir ( $ this -> connection , $ directory ) ; if ( $ result === false ) { throw new Exception ( 'Unable to change directory' ) ; } return $ this ; }
Changes the current directory to the specified one

@return FTPClient
Changes the current directory to the specified one