Signed-off-by: Vincent Petry <vincent@nextcloud.com>
/**
* Make a computer file size
* @param string $str file size in human readable format
- * @return int|false a file size in bytes
+ * @return float|bool a file size in bytes
*
* Makes 2kB to 2048.
*
public static function computerFileSize($str) {
$str = strtolower($str);
if (is_numeric($str)) {
- return (int)$str;
+ return (float)$str;
}
$bytes_array = [
$bytes = round($bytes);
- return (int)$bytes;
+ return $bytes;
}
/**
* Get the quota of a user
*
* @param IUser|null $user
- * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes
+ * @return float Quota bytes
*/
public static function getUserQuota(?IUser $user) {
if (is_null($user)) {