/**
* Gets the size of the directory and all subfolders and files
*
* @param string $dir The path of the directory
* @return mixed
*/
public static function size($dir)
{
if (!file_exists($dir)) {
return false;
}
// It's easier to handle this with the Folder class
$object = new Folder($dir);
return $object->size();
}