|
@@ -273,6 +273,17 @@ class File {
|
|
if ( ! $preserve) @rmdir($directory);
|
|
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.
|
|
* Get the most recently modified file in a directory.
|
|
*
|
|
*
|