Back

filesize (clj)

(source)

function

(filesize bytes & {:keys [binary format], :or {binary false, format "%.1f"}})
Format a number of bytes as a human readable filesize (eg. 10 kB). By default, decimal suffixes (kB, MB) are used. Passing :binary true will use binary suffixes (KiB, MiB) instead.

Examples