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

    {

        if ( ! is_mocked('rmdir')) {

            return \rmdir(...$arguments);

        }



        return return_mocked_value('rmdir');
<?php             unlink("$dir/$file");

        }

    }

    rmdir($dir);

}
<?php         unset($contents);



        if ( ! @rmdir($location)) {

            throw UnableToDeleteDirectory::atLocation($prefix, error_get_last()['message'] ?? '');

        }

    }
<?php     {

        switch ($file->getType()) {

            case 'dir':

                return @rmdir((string) $file->getRealPath());

            case 'link':

                return @unlink((string) $file->getPathname());

            default: