FEATURE: support only directories will be displayed. Flag -D

This commit is contained in:
DIRE
2022-09-30 11:32:46 +09:00
committed by andy.boot
parent e858f9e976
commit 2ca7177446
10 changed files with 34 additions and 7 deletions
+4
View File
@@ -19,6 +19,7 @@ pub struct Config {
pub ignore_hidden: Option<bool>,
pub iso: Option<bool>,
pub min_size: Option<String>,
pub only_dir: Option<bool>,
}
impl Config {
@@ -61,6 +62,9 @@ impl Config {
size_from_param
}
}
pub fn get_only_dir(&self, options: &ArgMatches) -> bool {
Some(true) == self.only_dir || options.is_present("only_dir")
}
}
fn convert_min_size(input: &str, iso: bool) -> Option<usize> {