Browse Source

Added File::mkdir.

Taylor Otwell 12 years ago
parent
commit
13a70bcc3a
1 changed files with 12 additions and 0 deletions
  1. 12 0
      laravel/file.php

+ 12 - 0
laravel/file.php

@@ -197,6 +197,18 @@ class File {
 		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.
 	 *