src/Koldy/Filesystem/Directory.php
public static function rmdirRecursive(string $directory): void
    {
        if (is_dir($directory)) {
            static::emptyDirectory($directory);

            if (!rmdir($directory)) {
                throw new FilesystemException("Unable to remove directory on path={$directory}");
            }
        }
    }
public static function rmdirRecursive(string $directory): void
    {
        if (is_dir($directory)) {
            static::emptyDirectory($directory);

            if (!rmdir($directory)) {
                throw new FilesystemException("Unable to remove directory on path={$directory}");
            }
        }
    }
public static function rmdirRecursive ( string $ directory ) : void { if ( is_dir ( $ directory ) ) { static :: emptyDirectory ( $ directory ) ; if ( ! rmdir ( $ directory ) ) { throw new FilesystemException ( "Unable to remove directory on path={$directory}" ) ; } } }
Remove directory and content inside recursively

@param string $directory

@throws FilesystemException
Remove directory and content inside recursively