getSize method

double getSize()

This automatically picks TB, GB, MB, KB, or bytes depending on which returns larger than 0.5

This provides no way to know what it returns, if you need to know, use the toString method, or the individual functions to get various size types

Implementation

double getSize() {
  if (tb() > 0.5)
    return tb();
  else if (gb() > 0.5)
    return gb();
  else if (mb() > 0.5)
    return mb();
  else if (kb() > 0.5)
    return kb();
  else
    return size.toDouble();
}