function Filesystem::mkdir
Same name in this branch
- 11.1.x vendor/php-tuf/composer-stager/src/Internal/Filesystem/Service/Filesystem.php \PhpTuf\ComposerStager\Internal\Filesystem\Service\Filesystem::mkdir()
- 11.1.x core/lib/Drupal/Core/File/FileSystem.php \Drupal\Core\File\FileSystem::mkdir()
Creates a directory recursively.
Throws
IOException On any directory creation failure
5 calls to Filesystem::mkdir()
- Filesystem::appendToFile in vendor/
symfony/ filesystem/ Filesystem.php - Appends content to an existing file.
- Filesystem::copy in vendor/
symfony/ filesystem/ Filesystem.php - Copies a file.
- Filesystem::dumpFile in vendor/
symfony/ filesystem/ Filesystem.php - Atomically dumps content into a file.
- Filesystem::mirror in vendor/
symfony/ filesystem/ Filesystem.php - Mirrors a directory to another.
- Filesystem::symlink in vendor/
symfony/ filesystem/ Filesystem.php - Creates a symbolic link or copy a directory.
File
-
vendor/
symfony/ filesystem/ Filesystem.php, line 90
Class
- Filesystem
- Provides basic utility to manipulate the file system.
Namespace
Symfony\Component\FilesystemCode
public function mkdir(string|iterable $dirs, int $mode = 0777) : void {
foreach ($this->toIterable($dirs) as $dir) {
if (is_dir($dir)) {
continue;
}
if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) {
throw new IOException(\sprintf('Failed to create "%s": ', $dir) . self::$lastError, 0, null, $dir);
}
}
}