public function login($username = null, $password = null)
    {
        if (false === @$this->cd()) {
            if (true === @$this->mkdir()) {
                @$this->cd();
            } else {
                throw new Exception\AuthenticationException(sprintf('Unable to change dir to %s', $this->_remotepath));
            }
        }

        return $this;
    }
public function login($username = null, $password = null)
    {
        if (false === @$this->cd()) {
            if (true === @$this->mkdir()) {
                @$this->cd();
            } else {
                throw new Exception\AuthenticationException(sprintf('Unable to change dir to %s', $this->_remotepath));
            }
        }

        return $this;
    }
public function login ( $ username = null , $ password = null ) { if ( false === @ $ this -> cd ( ) ) { if ( true === @ $ this -> mkdir ( ) ) { @ $ this -> cd ( ) ; } else { throw new Exception \ AuthenticationException ( sprintf ( 'Unable to change dir to %s' , $ this -> _remotepath ) ) ; } } return $ this ; }
Tries to change dir to the defined remote path.
An error is triggered if failed.

@param string $username
@param string $password

@return \BackBee\Util\Transport\FileSystem

@throws \BackBee\Util\Transport\Exception\AuthenticationException
Tries to change dir to the defined remote path . An error is triggered if failed .