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());
<?php return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback, $class));
}
$classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class)));
$classDirnameSegments = explode('\\', $classDirname);
<?php protected function ensureCacheDirectoryExists($path)
{
$directory = dirname($path);
if (! $this->files->exists($directory)) {
$this->files->makeDirectory($directory, 0777, true, true);
<?php $this->ensurePermissionsAreCorrect($directory);
$this->ensurePermissionsAreCorrect(dirname($directory));
}
}
<?php protected function makeDirectory($path)
{
if (! $this->files->isDirectory(dirname($path))) {
$this->files->makeDirectory(dirname($path), 0777, true, true);
}
<?php protected function makeDirectory($path)
{
if (! $this->files->isDirectory(dirname($path))) {
$this->files->makeDirectory(dirname($path), 0777, true, true);
}
return $path;
<?php protected function path(Connection $connection)
{
return tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.sql'), function ($path) {
(new Filesystem)->ensureDirectoryExists(dirname($path));
});
}
}
<?php $path = $this->getPath($name, $path);
$this->files->ensureDirectoryExists(dirname($path));
$this->files->put(
$path, $this->populateStub($stub, $table)
<?php $path = realpath($path) ?: $path;
$tempPath = tempnam(dirname($path), basename($path));
if (! is_null($mode)) {
<?php );
}
$relativeTarget = (new SymfonyFilesystem)->makePathRelative($target, dirname($link));
$this->link($this->isFile($target) ? rtrim($relativeTarget, '/') : $relativeTarget, $link);
}
<?php protected function ensureDirectoryExists($path)
{
if (! file_exists(dirname($path))) {
@mkdir(dirname($path), 0777, true);
}
}
<?php protected function ensureDirectoryExists($path)
{
if (! file_exists(dirname($path))) {
@mkdir(dirname($path), 0777, true);
}
}