public static function mkdir($path)
    {
        if (!is_dir($path)) {
            // the mode in mkdir is modified by the current umask
            @mkdir($path, self::getChmodForPath($path), $recursive = true);
        }

        // try to overcome restrictive umask (mis-)configuration
        if (!is_writable($path)) {
            @chmod($path, 0755);
            if (!is_writable($path)) {
                @chmod($path, 0775);
                // enough! we're not going to make the directory world-writeable
            }
        }

        self::createIndexFilesToPreventDirectoryListing($path);
    }
public static function mkdir($path)
    {
        if (!is_dir($path)) {
            // the mode in mkdir is modified by the current umask
            @mkdir($path, self::getChmodForPath($path), $recursive = true);
        }

        // try to overcome restrictive umask (mis-)configuration
        if (!is_writable($path)) {
            @chmod($path, 0755);
            if (!is_writable($path)) {
                @chmod($path, 0775);
                // enough! we're not going to make the directory world-writeable
            }
        }

        self::createIndexFilesToPreventDirectoryListing($path);
    }
public static function mkdir ( $ path ) { if ( ! is_dir ( $ path ) ) { // the mode in mkdir is modified by the current umask @ mkdir ( $ path , self :: getChmodForPath ( $ path ) , $ recursive = true ) ; } // try to overcome restrictive umask (mis-)configuration if ( ! is_writable ( $ path ) ) { @ chmod ( $ path , 0755 ) ; if ( ! is_writable ( $ path ) ) { @ chmod ( $ path , 0775 ) ; // enough! we're not going to make the directory world-writeable } } self :: createIndexFilesToPreventDirectoryListing ( $ path ) ; }
Attempts to create a new directory. All errors are silenced.

_Note: This function does **not** create directories recursively._

@param string $path The path of the directory to create.
@api
Attempts to create a new directory . All errors are silenced .