feat: display the size of a file or directory in "kilobytes"

feat: display the size of a file or directory in "kilobytes"
This commit is contained in:
zhaotao1
2023-04-10 09:57:40 +08:00
committed by andy.boot
parent a4b5d8573b
commit e9bacdf875
11 changed files with 96 additions and 30 deletions
+4
View File
@@ -26,6 +26,7 @@ pub struct Config {
pub disable_progress: Option<bool>,
pub depth: Option<usize>,
pub bars_on_right: Option<bool>,
pub display_kb: Option<bool>,
pub stack_size: Option<usize>,
}
@@ -104,6 +105,9 @@ impl Config {
from_cmd_line.copied()
}
}
pub fn get_display_kb(&self, options: &ArgMatches) -> bool {
Some(true) == self.display_kb || options.get_flag("display_kb")
}
}
fn convert_min_size(input: &str, iso: bool) -> Option<usize> {