diff --git a/laravel/file.php b/laravel/file.php index 749232e7..94147485 100644 --- a/laravel/file.php +++ b/laravel/file.php @@ -273,6 +273,17 @@ class File { if ( ! $preserve) @rmdir($directory); } + /** + * Empty the specified directory of all files and folders. + * + * @param string $directory + * @return void + */ + public static function cleandir($directory) + { + return static::rmdir($directory, true); + } + /** * Get the most recently modified file in a directory. *