No, actually it's
File::makeDirectory($path);
Also, you may try this:
$path = public_path().'/images/article/imagegallery/' . $galleryId;
File::makeDirectory($path, $mode = 0777, true, true);
Update: Actually it does work, mkdir
is being used behind the scene. This is the source:
/**
* Create a directory.
*
* @param string $path
* @param int $mode
* @param bool $recursive
* @param bool $force
* @return bool
*/
public function makeDirectory($path, $mode = 0777, $recursive = false, $force = false)
{
if ($force)
{
return @mkdir($path, $mode, $recursive);
}
else
{
return mkdir($path, $mode, $recursive);
}
}
For deleting:
public function deleteDirectory($directory, $preserve = false);
Check the source at following path (in your local installation):
root/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…