123.45 B|KB|MB|GB|TB or {$file_path|fsize:"MB"} => 123.45 MB or {$file_path|fsize:"TB":4} => 0.0012 TB * Params: string path the file path string format the format, the output shall be: B, KB, MB, GB or TB int precision the rounding precision string dec_point the decimal separator string thousands_sep the thousands separator * Install: Drop into the plugin directory * Version: * 2003-05-21 Version 0.1b - initial release * ------------------------------------------------------------- */ function smarty_modifier_fsize($file, $table = 'doc',$format = '',$precision = 2, $dec_point = ".", $thousands_sep = ",",$external=false) { require_once dirname(__FILE__) . '/modifier.fsize_format.php'; if($external) $_file = $table . "/" . $file; else $_file = ROOTDIR . "/files/" . $table."/".$file; if(file_exists($_file)) { $_size = filesize($_file); } return smarty_modifier_fsize_format($_size,$format,$precision,$dec_point,$thousands_sep); } //~ end function ?>