Dust::SizeFormat
Size and min-size formatting, ported from display.rs and config.rs.
Constants
IEC_UNITS = ["Pi", "Ti", "Gi", "Mi", "Ki"] of ::String
SI_UNITS = ["P", "T", "G", "M", "K"] of ::String
Instance methods
humanize(size : UInt64, format : String) : String
Sourcenumber_format(format : String) : Tuple(UInt64, String) | Nil
A forced output unit (-o kib, -o b, ...) as {multiplier, suffix}.
parse_min(input : String) : UInt64 | Nil
Parses --min-size. Accepts bare bytes and any SI/IEC suffix, case
insensitively. Returns nil (after warning) for anything else.
units(format : String) : Array(String)
Source