RecursiveFolderDelete()WPSCache 1.0

Хуков нет.

Возвращает

null. Ничего (null).

Использование

RecursiveFolderDelete ( $folderPath ) // from http://www.php.net/manual/en/function.rmdir.php;
$folderPath (обязательный)
-

Код RecursiveFolderDelete() WPSCache 1.12.4

function RecursiveFolderDelete ( $folderPath ) { // from http://www.php.net/manual/en/function.rmdir.php
	if( trailingslashit( constant( 'ABSPATH' ) ) == trailingslashit( $folderPath ) )
		return false;
	if ( @is_dir ( $folderPath ) ) {
		$dh  = @opendir($folderPath);
		while (false !== ($value = @readdir($dh))) {
			if ( $value != "." && $value != ".." ) {
				$value = $folderPath . "/" . $value;
				if ( @is_dir ( $value ) ) {
					RecursiveFolderDelete ( $value );
				}
			}
		}
		return @rmdir ( $folderPath );
	} else {
		return FALSE;
	}
}