flix

0.69.3

Fs.Size

enum Size with Eq, Order, HashSource
case Size(Int64)

Represents a file size stored as bytes (Int64).

Instances

instance Add[Size]Source
instance Eq[Size]Source
instance Formattable[Size]Source
instance Hash[Size]Source
instance Order[Size]Source
instance Sub[Size]Source
instance ToString[Size]Source

Definitions

def bytes(n: Int64): Size Source

Returns a size of n bytes.

def gigaBytes(n: Int32): Size Source

Returns a size of n gigabytes.

def isNegative(s: Size): Bool Source

Returns true if s is negative.

def isPositive(s: Size): Bool Source

Returns true if s is positive.

def isZero(s: Size): Bool Source

Returns true if s is zero.

def kiloBytes(n: Int32): Size Source

Returns a size of n kilobytes.

def megaBytes(n: Int32): Size Source

Returns a size of n megabytes.

def of(n: Int32, u: SizeUnit): Size Source

Returns a size of n in the given size unit u.

def teraBytes(n: Int32): Size Source

Returns a size of n terabytes.

def toBytes(s: Size): Int64 Source

Returns the total number of bytes in s.

def toGigaBytes(s: Size): Int64 Source

Returns the total number of gigabytes in s (truncated).

def toKiloBytes(s: Size): Int64 Source

Returns the total number of kilobytes in s (truncated).

def toMegaBytes(s: Size): Int64 Source

Returns the total number of megabytes in s (truncated).

def toTeraBytes(s: Size): Int64 Source

Returns the total number of terabytes in s (truncated).

def zero(): Size Source

Returns the zero size.