Function file_size_to_string

Source
pub fn file_size_to_string(file_size: f64, file_size_round: i32) -> String
Expand description

“Convert byte values into a human-readable format. Example: 1024 bytes to 1 KB.”

use tree_mapper::file_size_to_string;
let file_size: f64 = 1024.00;
let result: String = file_size_to_string(file_size,1);
println!("{:#?}",result);