enum Size with Eq, Order, Hash
case Size(Int64)
Represents a file size stored as bytes (Int64).
instance Add[Size]
instance Eq[Size]
instance Formattable[Size]
instance Hash[Size]
instance Order[Size]
instance Sub[Size]
instance ToString[Size]
def bytes(n: Int64): Size
Returns a size of n bytes.
n
def gigaBytes(n: Int32): Size
Returns a size of n gigabytes.
def isNegative(s: Size): Bool
Returns true if s is negative.
true
s
def isPositive(s: Size): Bool
Returns true if s is positive.
def isZero(s: Size): Bool
Returns true if s is zero.
def kiloBytes(n: Int32): Size
Returns a size of n kilobytes.
def megaBytes(n: Int32): Size
Returns a size of n megabytes.
def of(n: Int32, u: SizeUnit): Size
Returns a size of n in the given size unit u.
u
def teraBytes(n: Int32): Size
Returns a size of n terabytes.
def toBytes(s: Size): Int64
Returns the total number of bytes in s.
def toGigaBytes(s: Size): Int64
Returns the total number of gigabytes in s (truncated).
def toKiloBytes(s: Size): Int64
Returns the total number of kilobytes in s (truncated).
def toMegaBytes(s: Size): Int64
Returns the total number of megabytes in s (truncated).
def toTeraBytes(s: Size): Int64
Returns the total number of terabytes in s (truncated).
def zero(): Size
Returns the zero size.