fixes #1317 remove cache directory size calculation

This commit is contained in:
plegall
2021-02-05 10:12:05 +01:00
parent 82f6371955
commit ea69988eac
2 changed files with 0 additions and 44 deletions

View File

@@ -625,32 +625,6 @@ function get_fs_directories($path, $recursive = true)
return $dirs;
}
/**
* returns the size (in bytes) of a filesystem directory
*
* @since 11
* @param string path
* @return int
*/
function get_fs_directory_size($path)
{
$bytestotal = 0;
$path = realpath($path);
if (!function_exists('exec'))
{
return false;
}
@exec('du -sk '.$path, $returnarray);
if (is_array($returnarray) and !empty($returnarray[0]) and preg_match('/^(\d+)\s/', $returnarray[0], $matches))
{
$bytestotal = $matches[1] * 1024;
}
return $bytestotal;
}
/**
* save the rank depending on given categories order
*