createDirectory() public static method
Creates a new directory.
This method is similar to the PHP mkdir()
function except that it uses chmod()
to set the permission of the created directory in order to avoid the impact of the umask
setting.
public static boolean createDirectory ( $path, $mode = 509, $recursive = true ) | ||
---|---|---|
$path | string |
Path of the directory to be created. |
$mode | integer |
The permission to be set for the created directory. |
$recursive | boolean |
Whether to create parent directories if they do not exist. |
return | boolean |
Whether the directory is created successfully |
throws | yii\base\Exception |
if the directory could not be created (i.e. php error due to parallel changes) |
Please login to continue.