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         $backupPath = dirname($file).'/'.UpdateScript::BACKUP_PATH;



        if (! is_dir($backupDir = dirname($backupPath))) {

            mkdir($backupDir, 0777, true);

        }



        copy($file, $backupPath);
<?php     public function write($path, $content, $lockFor = 0)

    {

        @mkdir(dirname($path), 0777, true);
<?php     public function it_can_backup_lock_file_from_custom_location()

    {

        if (! is_dir($dir = './custom')) {

            mkdir($dir);

        }



        file_put_contents($this->customLockPath, $content = 'custom lock file content');
<?php         $entry = (new Entry)->collection($collection)->slug('bar');

        $path = $entry->path();

        $date = Carbon::parse('2017-01-02');

        mkdir(dirname($path));

        touch($path, $date->timestamp);



        $this->assertTrue($date->eq($entry->lastModified()));
<?php         parent::setUp();



        $this->tempDir = __DIR__.'/tmp';

        mkdir($this->tempDir);

        $this->baseDir = $this->tempDir;

        mkdir($this->outsideRoot = $this->tempDir.'/outside-root');

        mkdir($this->tempDir = $this->tempDir.'/root');
<?php         $this->tempDir = __DIR__.'/tmp';

        mkdir($this->tempDir);

        $this->baseDir = $this->tempDir;

        mkdir($this->outsideRoot = $this->tempDir.'/outside-root');

        mkdir($this->tempDir = $this->tempDir.'/root');



        $this->adapter = $this->makeAdapter();
<?php         mkdir($this->tempDir);

        $this->baseDir = $this->tempDir;

        mkdir($this->outsideRoot = $this->tempDir.'/outside-root');

        mkdir($this->tempDir = $this->tempDir.'/root');



        $this->adapter = $this->makeAdapter();

    }
<?php     public function it_gets_files_from_outside_of_the_root_and_outputs_absolute_paths()

    {

        mkdir($this->outsideRoot.'/sub', 0755, true);

        file_put_contents($this->outsideRoot.'/sub/one.txt', '');

        file_put_contents($this->outsideRoot.'/sub/two.txt', '');
<?php     public function it_can_explicitly_request_absolute_paths()

    {

        mkdir($this->tempDir.'/sub/sub', 0755, true);

        file_put_contents($this->tempDir.'/one.txt', '');

        file_put_contents($this->tempDir.'/sub/two.txt', '');

        file_put_contents($this->tempDir.'/sub/three.txt', '');
<?php     public function gets_files_from_a_directory()

    {

        mkdir($this->tempDir.'/sub/sub', 0755, true);

        file_put_contents($this->tempDir.'/one.txt', '');

        file_put_contents($this->tempDir.'/sub/two.txt', '');

        file_put_contents($this->tempDir.'/sub/three.txt', '');
<?php     public function gets_files_from_a_directory_recursively()

    {

        mkdir($this->tempDir.'/sub/sub', 0755, true);

        file_put_contents($this->tempDir.'/one.txt', '');

        file_put_contents($this->tempDir.'/sub/two.txt', '');

        file_put_contents($this->tempDir.'/sub/three.txt', '');
<?php     public function gets_files_recursively_with_directory_exceptions()

    {

        mkdir($this->tempDir.'/sub/sub', 0755, true);

        mkdir($this->tempDir.'/sub/exclude', 0755, true);

        file_put_contents($this->tempDir.'/one.txt', '');

        file_put_contents($this->tempDir.'/sub/two.txt', '');
<?php     public function gets_files_recursively_with_directory_exceptions()

    {

        mkdir($this->tempDir.'/sub/sub', 0755, true);

        mkdir($this->tempDir.'/sub/exclude', 0755, true);

        file_put_contents($this->tempDir.'/one.txt', '');

        file_put_contents($this->tempDir.'/sub/two.txt', '');

        file_put_contents($this->tempDir.'/sub/three.txt', '');
<?php     public function gets_folders()

    {

        mkdir($this->tempDir.'/foo');

        mkdir($this->tempDir.'/foo/bar');

        mkdir($this->tempDir.'/foo/baz');

        mkdir($this->tempDir.'/foo/bar/qux');
<?php     public function gets_folders()

    {

        mkdir($this->tempDir.'/foo');

        mkdir($this->tempDir.'/foo/bar');

        mkdir($this->tempDir.'/foo/baz');

        mkdir($this->tempDir.'/foo/bar/qux');

        mkdir($this->tempDir.'/baz');