features/bootstrap/FeatureContext.php
private static function rmdir($path) {
        foreach (glob($path . '/*') as $file) {
            if (is_dir($file)) {
                self::rmdir($file);
            } else {
                unlink($file);
            }
        }

        // Remove the remaining directory
        rmdir($path);
    }
private static function rmdir($path) {
        foreach (glob($path . '/*') as $file) {
            if (is_dir($file)) {
                self::rmdir($file);
            } else {
                unlink($file);
            }
        }

        // Remove the remaining directory
        rmdir($path);
    }
private static function rmdir ( $ path ) { foreach ( glob ( $ path . '/*' ) as $ file ) { if ( is_dir ( $ file ) ) { self :: rmdir ( $ file ) ; } else { unlink ( $ file ) ; } } // Remove the remaining directory rmdir ( $ path ) ; }
Recursively delete a directory

@param string $path Path to a file or a directory
Recursively delete a directory