function drupal_mkdir


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)
cle7 drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)
elmsmedia7 drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)
icor7 drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)
meedjum_blog7 drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)
mooc7 drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)

Creates a directory using Drupal's default mode.

PHP's mkdir() does not respect Drupal's default permissions mode. If a mode is not provided, this function will make sure that Drupal's is used.

Compatibility: normal paths and stream wrappers.


$uri: A URI or pathname.

$mode: By default the Drupal mode is used.

$recursive: Default to FALSE.

$context: Refer to

Return value

Boolean TRUE on success, or FALSE on failure.

See also


Related topics

6 calls to drupal_mkdir()
Archive_Tar::_dirCheck in modules/system/
Check if a directory exists and create it (including parent dirs) if not.
Archive_Tar::_extractList in modules/system/
at_core_settings_validate in sites/all/themes/ulmus/adaptivetheme/at_core/inc/forms/
@file Validatation for theme settings.
drupal_install_mkdir in includes/
Creates a directory with the specified permissions.
file_prepare_directory in includes/
Checks that the directory exists and is writable.

... See full list


includes/, line 2359
API for handling file uploads and server file management.


function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
  if (!isset($mode)) {
    $mode = variable_get('file_chmod_directory', 0775);

  if (!isset($context)) {
    return mkdir($uri, $mode, $recursive);
  else {
    return mkdir($uri, $mode, $recursive, $context);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.