]> git.ipfire.org Git - ipfire-2.x.git/commit
general-functions.pl: Add formatBytes() function.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 13 Apr 2020 07:45:35 +0000 (09:45 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 1 May 2020 19:12:40 +0000 (19:12 +0000)
commitc5f85b115248d828b2f3421e28544b00c2bf419d
tree40f7113e9e28bff7b8a5da3a50ec494d7b3c0834
parent6317d55c4ae85338b847ffe4e276fd75a076fb1c
general-functions.pl: Add formatBytes() function.

This function can be used to convert an amount of bytes to a
humand-readable format.

For example "3221225472" will become "3MB".

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/cfgroot/general-functions.pl