Upgrade to 3.6.2
This commit is contained in:
@@ -482,11 +482,14 @@ class Dir
|
||||
* Returns a nicely formatted size of all the contents of the folder
|
||||
*
|
||||
* @param string $dir The path of the directory
|
||||
* @param string|null|false $locale Locale for number formatting,
|
||||
* `null` for the current locale,
|
||||
* `false` to disable number formatting
|
||||
* @return mixed
|
||||
*/
|
||||
public static function niceSize(string $dir)
|
||||
public static function niceSize(string $dir, $locale = null)
|
||||
{
|
||||
return F::niceSize(static::size($dir));
|
||||
return F::niceSize(static::size($dir), $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -513,9 +516,7 @@ class Dir
|
||||
|
||||
// add absolute paths
|
||||
if ($absolute === true) {
|
||||
$result = array_map(function ($item) use ($dir) {
|
||||
return $dir . '/' . $item;
|
||||
}, $result);
|
||||
$result = array_map(fn ($item) => $dir . '/' . $item, $result);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user