Are there any libraries that provide an object/class with implicits conversions (from Int, Long, Float) for human readable file size units (like Duration).
I've just stumbled upon squants. As stated in their own site:
Squants is a framework of data types and a domain specific language (DSL) for representing Quantities, their Units of Measure, and their Dimensional relationships. The API supports typesafe dimensional analysis, improved domain models and more. All types are immutable and thread-safe.
With squants you can do:
10.kib 10.kibibytes 50.mib 100.gib
Although i didn't like that the unit symbols are all lowercase (i.e. gib instead of GiB)