Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns a parent directory's path
dirname(string $pathint $levels 1): string
            return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback$class));

        }



        
$classDirname str_replace('/''\\'dirname(str_replace('\\''/'$class)));



        
$classDirnameSegments explode('\\'$classDirname);
    protected function ensureCacheDirectoryExists($path)

    {

        
$directory dirname($path);



        if (! 
$this->files->exists($directory)) {

            
$this->files->makeDirectory($directory0777truetrue);
            $this->ensurePermissionsAreCorrect($directory);

            
$this->ensurePermissionsAreCorrect(dirname($directory));

        }

    }
    protected function makeDirectory($path)

    {

        if (! 
$this->files->isDirectory(dirname($path))) {

            
$this->files->makeDirectory(dirname($path), 0777truetrue);

        }
    protected function makeDirectory($path)

    {

        if (! 
$this->files->isDirectory(dirname($path))) {

            
$this->files->makeDirectory(dirname($path), 0777truetrue);

        }



        return 
$path;
    protected function path(Connection $connection)

    {

        return 
tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.dump'), function ($path) {

            (new 
Filesystem)->ensureDirectoryExists(dirname($path));

        });

    }

}
        $path $this->getPath($name$path);



        
$this->files->ensureDirectoryExists(dirname($path));



        
$this->files->put(

            
$path$this->populateStub($stub$table)
        $path realpath($path) ?: $path;



        
$tempPath tempnam(dirname($path), basename($path));




        
chmod($tempPath0777 umask());
            );

        }



        
$relativeTarget = (new SymfonyFilesystem)->makePathRelative($targetdirname($link));



        
$this->link($relativeTarget$link);

    }
    protected function ensureDirectoryExists($path)

    {

        if (! 
file_exists(dirname($path))) {

            @
mkdir(dirname($path), 0777true);

        }

    }
    protected function ensureDirectoryExists($path)

    {

        if (! 
file_exists(dirname($path))) {

            @
mkdir(dirname($path), 0777true);

        }

    }
    protected function formatFacadeStub($alias$stub)

    {

        
$replacements = [

            
str_replace('/''\\'dirname(str_replace('\\''/'$alias))),

            
class_basename($alias),

            
substr($aliasstrlen(static::$facadeNamespace)),

        ];
            str_replace('.''/''components.'.$this->getView()).'.blade.php'

        
);



        if (! 
$this->files->isDirectory(dirname($path))) {

            
$this->files->makeDirectory(dirname($path), 0777truetrue);

        }
        );



        if (! 
$this->files->isDirectory(dirname($path))) {

            
$this->files->makeDirectory(dirname($path), 0777truetrue);

        }



        if (
$this->files->exists($path) && ! $this->option('force')) {
            str_replace('.''/'$this->getView()).'.blade.php'

        
);



        if (! 
$this->files->isDirectory(dirname($path))) {

            
$this->files->makeDirectory(dirname($path), 0755true);

        }