mirror of
https://github.com/darakian/ddh.git
synced 2026-09-10 07:06:21 -04:00
csv output added
This commit is contained in:
parent
ae94df594b
commit
871c433077
|
|
@ -84,7 +84,7 @@ fn main() {
|
|||
.arg(Arg::with_name("Print")
|
||||
.short("p")
|
||||
.long("print")
|
||||
.possible_values(&["single", "shared"])
|
||||
.possible_values(&["single", "shared", "csv"])
|
||||
.case_insensitive(true)
|
||||
.takes_value(true)
|
||||
.help("Print Single Instance or Shared Instance files.")
|
||||
|
|
@ -134,6 +134,11 @@ fn main() {
|
|||
x.file_paths.par_iter().for_each(|y| println!("{} - {:x}", y.to_str().unwrap(), x.file_hash));
|
||||
println!("Total disk usage {} {}", ((x.file_paths.len() as u64)*x.file_len)/display_divisor, blocksize)})
|
||||
},
|
||||
"csv" => {unique_files.iter().for_each(|x| {
|
||||
println!("{} {:x}", x.file_paths.iter().next().unwrap().to_str().unwrap(), x.file_hash)});
|
||||
shared_files.iter().for_each(|x| {
|
||||
x.file_paths.par_iter().for_each(|y| println!("{} {:x}", y.to_str().unwrap(), x.file_hash));})
|
||||
},
|
||||
_ => {}};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue