Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns a parent directory's path
<?php dirname(string $path, int $levels = 1): string
<?php     protected function ensureDirectoryExists($path)

    {

        if (! File::isDirectory(dirname($path))) {

            File::makeDirectory(dirname($path), 0777, $recursive = true, $force = true);

        }

    }
<?php     protected function ensureDirectoryExists($path)

    {

        if (! File::isDirectory(dirname($path))) {

            File::makeDirectory(dirname($path), 0777, $recursive = true, $force = true);

        }

    }
<?php                     return ['Skipped', $component, 'Already exists'];

                }



                if($this->filesystem()->directoryMissing(dirname($newParser->relativeClassPath()))) {

                    $this->filesystem()->createDirectory(dirname($newParser->relativeClassPath()));

                }
<?php                 }



                if($this->filesystem()->directoryMissing(dirname($newParser->relativeClassPath()))) {

                    $this->filesystem()->createDirectory(dirname($newParser->relativeClassPath()));

                }



                $this->filesystem()->put($newParser->relativeClassPath(), $newParser->classContents());