protected function doChangeDir($dir)
    {
        $connection = $this->connection;

        return $this->retry(function () use ($connection, $dir) {
            $res = @ftp_chdir($connection, $dir);

            if (false === $res) {
                throw new \RuntimeException("Changing directory failed: ".$dir);
            }
        });
    }
protected function doChangeDir($dir)
    {
        $connection = $this->connection;

        return $this->retry(function () use ($connection, $dir) {
            $res = @ftp_chdir($connection, $dir);

            if (false === $res) {
                throw new \RuntimeException("Changing directory failed: ".$dir);
            }
        });
    }
protected function doChangeDir ( $ dir ) { $ connection = $ this -> connection ; return $ this -> retry ( function ( ) use ( $ connection , $ dir ) { $ res = @ ftp_chdir ( $ connection , $ dir ) ; if ( false === $ res ) { throw new \ RuntimeException ( "Changing directory failed: " . $ dir ) ; } } ) ; }
Change current working directory.

@param   string  dir name

@return bool
Change current working directory .