Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Removes directory
<?php rmdir(string $directory, ?resource $context = null): bool
<?php     public function rmdir($path)

    {

        $deleted = @rmdir($path);

        if (!$deleted) {


            if (Platform::isWindows()) {
<?php             if (Platform::isWindows()) {

                usleep(350000);

                $deleted = @rmdir($path);

            }



            if (!$deleted) {
<?php     private function unlinkImplementation($path)

    {

        if (Platform::isWindows() && is_dir($path) && is_link($path)) {

            return rmdir($path);

        }



        return unlink($path);
<?php         $downloader->prepare('install', $packageMock, 'composerPath');

        $downloader->install($packageMock, 'composerPath');

        $downloader->cleanup('install', $packageMock, 'composerPath');

        @rmdir($cachePath);

    }



    public function testDownloadUsesVariousProtocolsAndSetsPushUrlForGithub()
<?php         $dispatcher->expects($this->atLeastOnce())->method('getListeners')->will($this->returnValue($listeners));



        $dispatcher->dispatchScript(ScriptEvents::POST_INSTALL_CMD, false);

        rmdir(__DIR__ . '/vendor/bin');

        rmdir(__DIR__ . '/vendor');



        chdir($currentDirectoryBkp);
<?php         $dispatcher->dispatchScript(ScriptEvents::POST_INSTALL_CMD, false);

        rmdir(__DIR__ . '/vendor/bin');

        rmdir(__DIR__ . '/vendor');



        chdir($currentDirectoryBkp);

        if ($composerBinDirBkp) {