From 7861559f880e6fff3576bf4ac00afbf0d5489807 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Thu, 7 Dec 2023 11:58:11 +0100 Subject: [PATCH] du: put excludes in traversaloptions and make size_format enum --- src/uu/du/src/du.rs | 223 +++++++++++++++++--------------------------- 1 file changed, 86 insertions(+), 137 deletions(-) diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index 14c7fe5d4b3..7114ccc2668 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -83,25 +83,20 @@ struct TraversalOptions { dereference: Deref, count_links: bool, verbose: bool, + excludes: Vec, } -#[derive(Clone)] -struct PrintingOptions { +struct StatPrinter { total: bool, inodes: bool, max_depth: Option, threshold: Option, apparent_size: bool, - // TODO: the size conversion fields should be unified - si: bool, - bytes: bool, - human_readable: bool, - block_size_1k: bool, - block_size_1m: bool, - block_size: u64, + size_format: SizeFormat, time: Option