From 13a70bcc3aa02877f0178b89aa1d3e4283c1682a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Mar 2012 11:28:22 -0500 Subject: [PATCH] Added File::mkdir. --- laravel/file.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/laravel/file.php b/laravel/file.php index ca08a9c5..0346c83c 100644 --- a/laravel/file.php +++ b/laravel/file.php @@ -197,6 +197,18 @@ public static function is($extensions, $path) return false; } + /** + * Create a new directory. + * + * @param string $path + * @param int $chmod + * @return void + */ + public static function mkdir($path, $chmod = 0777) + { + return ( ! is_dir($path)) ? mkdir($path, $chmod, true) : true; + } + /** * Move a directory from one location to another. *