You are here

function drupal_mkdir in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/file.inc \drupal_mkdir()

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

10 calls to drupal_mkdir()
Connection::createDatabase in core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
Overrides \Drupal\Core\Database\Connection::createDatabase().
DirectoryTest::testFileCheckLocalDirectoryHandling in core/modules/system/src/Tests/File/DirectoryTest.php
Test local directory handling functions.
drupal_install_mkdir in core/includes/install.inc
Creates a directory with the specified permissions.
FileTestBase::createDirectory in core/modules/system/src/Tests/File/FileTestBase.php
Create a directory and assert it exists.
file_prepare_directory in core/includes/file.inc
Checks that the directory exists and is writable.

... See full list

File

core/includes/file.inc, line 1075
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);
}