makeDirectory.php
Table of Contents
Functions
- makeDirectory() : string|null
- Creates a directory if it does not exist and returns the path of the directory.
Functions
makeDirectory()
Creates a directory if it does not exist and returns the path of the directory.
makeDirectory(null|array<string|int, mixed>|string $pathOrOptions[, int $permissions = 0755 ][, bool $recursive = true ][, string|null $owner = null ][, string|null $group = null ]) : string|null
Parameters
- $pathOrOptions : null|array<string|int, mixed>|string
-
The path of the directory to create.
- $permissions : int = 0755
-
The permissions to set for the directory (default: 0755).
- $recursive : bool = true
-
If true, creates parent directories as needed (default: true).
- $owner : string|null = null
-
User name or ID to set as directory owner (optional).
- $group : string|null = null
-
Group name or ID to set as directory group (optional).
Tags
Return values
string|null —Returns the path of the directory.