drupal_mkdir

drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL)

Creates a directory, optionally creating missing components in the path to the directory.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::mkdir().

Related topics

File interface
Common file handling functions.

File

core/includes/file.inc, line 1158
API for handling file uploads and server file management.

Code

function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
  return \Drupal::service('file_system')->mkdir($uri, $mode, $recursive, $context);
}
doc_Drupal
2016-10-29 09:03:17
Comments
Leave a Comment

Please login to continue.