Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Makes directory
<?php mkdir(    string $directory,    int $permissions = 0777,    bool $recursive = false,    ?resource $context = null): bool
<?php         error_clear_last();



        if ( ! @mkdir($dirname, $visibility, true)) {

            $mkdirError = error_get_last();

        }
<?php         error_clear_last();



        if ( ! @mkdir($location, $permissions, true)) {

            throw UnableToCreateDirectory::atLocation($path, error_get_last()['message'] ?? '');

        }

    }
<?php     public function deleting_a_directory(): void

    {

        $adapter = new LocalFilesystemAdapter(static::ROOT);

        mkdir(static::ROOT . '/directory/subdir/', 0744, true);

        $this->assertDirectoryExists(static::ROOT . '/directory/subdir/');

        file_put_contents(static::ROOT . '/directory/subdir/file.txt', 'content');

        symlink(static::ROOT . '/directory/subdir/file.txt', static::ROOT . '/directory/subdir/link.txt');
<?php     {

        $dirname = dirname($fullPath);



        if (is_dir($dirname) || @mkdir($dirname, $this->localDirectoryPermissions, true)) {

            return;

        }