Skip to content

Kirby 5.0.4

Dir::make()

Creates a new directory

Dir::make(string $dir, bool $recursive = true): bool

Parameters

Name Type Default Description
$dirrequired string no default value The path for the new directory
$recursive bool true Create all parent directories, which don't exist

Return type

bool

True: the dir has been created, false: creating failed

Exceptions

Type Description
Exception If a file with the provided path already exists or the parent directory is not writable

Parent class

Kirby\Filesystem\Dir