public static function recursiveMkdir($pathname, $mode = 0777, $recursive = TRUE, $context = NULL) {
        if(is_dir($pathname)) {
            return TRUE;
        }

        if($context) {
            return mkdir($pathname, $mode, $recursive, $context);
        }
        else {
            return mkdir($pathname, $mode, $recursive);
        }
    }
public static function recursiveMkdir($pathname, $mode = 0777, $recursive = TRUE, $context = NULL) {
        if(is_dir($pathname)) {
            return TRUE;
        }

        if($context) {
            return mkdir($pathname, $mode, $recursive, $context);
        }
        else {
            return mkdir($pathname, $mode, $recursive);
        }
    }
public static function recursiveMkdir ( $ pathname , $ mode = 0777 , $ recursive = TRUE , $ context = NULL ) { if ( is_dir ( $ pathname ) ) { return TRUE ; } if ( $ context ) { return mkdir ( $ pathname , $ mode , $ recursive , $ context ) ; } else { return mkdir ( $ pathname , $ mode , $ recursive ) ; } }
Recursively created a directory

Like PHPs mkdir but this method will set the recursive flag to TRUE on default

@param string $pathname The directory that should be created
@param integer $mode Permission that the directories are created with
@param string $recursive Set to TRUE on default
@param mixed $context The context
@return TRUE on success and FALSE on failure
Recursively created a directory