Project

General

Profile

$bytes » History » Revision 2

Revision 1 (Per Amundsen, 02/28/2014 12:37 PM) → Revision 2/7 (Per Amundsen, 08/09/2015 06:07 AM)

_Added in 1.9.0_ 

 *$bytes(N,bkmgt3d)* 

 Returns comma formatted file-size. 

 *Parameters* 

 N - The number to format. _double_ 
 b - Show N in bytes. 
 k - Show N in kilobytes. 
 m - Show N in megabytes. 
 g - Show N in gigabytes. 
 t - Show N in terabytes. 
 3 - Show in 3 digits format. 
 d - TODO 

 *Properties* 

 .suf - Appends the b, k, M, G, T suffixes to the result. 

 *Example* 

 <pre> 
 ; Returns ;Returns 1. 
 //echo -ag $bytes(1024, k) 

 ; Returns ;Returns 1KB. 
 //echo -ag $bytes(1024, k).suf 
 </pre>