public static function makeDirectory($strPath, $intMode = null)
    {
        if (is_dir($strPath)) {
            // Directory Already Exists
            return true;
        }

        // Check to make sure the parent(s) exist, or create if not
        if (!self::makeDirectory(dirname($strPath), $intMode)) {
            return false;
        }

        if (PHP_OS != "Linux") {
            // Create the current node/directory, and return its result
            $blnReturn = mkdir($strPath);

            if ($blnReturn && !is_null($intMode)) {
                // Manually CHMOD to $intMode (if applicable)
                // mkdir doesn't do it for mac, and this will error on windows
                // Therefore, ignore any errors that creep up
                $e = new Error\Handler();
                chmod($strPath, $intMode);
            }
        } else {
            $blnReturn = mkdir($strPath, $intMode);
        }

        return $blnReturn;
    }
public static function makeDirectory($strPath, $intMode = null)
    {
        if (is_dir($strPath)) {
            // Directory Already Exists
            return true;
        }

        // Check to make sure the parent(s) exist, or create if not
        if (!self::makeDirectory(dirname($strPath), $intMode)) {
            return false;
        }

        if (PHP_OS != "Linux") {
            // Create the current node/directory, and return its result
            $blnReturn = mkdir($strPath);

            if ($blnReturn && !is_null($intMode)) {
                // Manually CHMOD to $intMode (if applicable)
                // mkdir doesn't do it for mac, and this will error on windows
                // Therefore, ignore any errors that creep up
                $e = new Error\Handler();
                chmod($strPath, $intMode);
            }
        } else {
            $blnReturn = mkdir($strPath, $intMode);
        }

        return $blnReturn;
    }
public static function makeDirectory ( $ strPath , $ intMode = null ) { if ( is_dir ( $ strPath ) ) { // Directory Already Exists return true ; } // Check to make sure the parent(s) exist, or create if not if ( ! self :: makeDirectory ( dirname ( $ strPath ) , $ intMode ) ) { return false ; } if ( PHP_OS != "Linux" ) { // Create the current node/directory, and return its result $ blnReturn = mkdir ( $ strPath ) ; if ( $ blnReturn && ! is_null ( $ intMode ) ) { // Manually CHMOD to $intMode (if applicable) // mkdir doesn't do it for mac, and this will error on windows // Therefore, ignore any errors that creep up $ e = new Error \ Handler ( ) ; chmod ( $ strPath , $ intMode ) ; } } else { $ blnReturn = mkdir ( $ strPath , $ intMode ) ; } return $ blnReturn ; }
Same as mkdir but correctly implements directory recursion.
At its core, it will use the php MKDIR function.
This method does no special error handling.  If you want to use special error handlers,
be sure to set that up BEFORE calling MakeDirectory.

@param         string $strPath actual path of the directoy you want created
@param         integer $intMode optional mode

@return         boolean        the return flag from mkdir
Same as mkdir but correctly implements directory recursion . At its core it will use the php MKDIR function . This method does no special error handling . If you want to use special error handlers be sure to set that up BEFORE calling MakeDirectory .