File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ pub struct Args {
56
56
/// Clears the trash Directory
57
57
#[ clap( long) ]
58
58
clear : bool ,
59
+
60
+ #[ clap( long) ]
61
+ db_delete : Option < String > ,
59
62
}
60
63
61
64
impl Args {
@@ -85,6 +88,8 @@ impl Args {
85
88
return InputType :: Open ;
86
89
} else if let true = self . clear {
87
90
return InputType :: Clear ;
91
+ } else if let Some ( _) = self . db_delete {
92
+ return InputType :: Dbdelete ;
88
93
} else {
89
94
unreachable ! ( )
90
95
}
@@ -105,6 +110,7 @@ enum InputType {
105
110
List ,
106
111
Open ,
107
112
Clear ,
113
+ Dbdelete ,
108
114
}
109
115
110
116
fn create_files ( args : & Args ) {
@@ -336,6 +342,8 @@ fn main() -> Result<(), Box<dyn Error>> {
336
342
InputType :: Open => open_file ( & args) ?,
337
343
338
344
InputType :: Clear => clear_trash ( ) ?,
345
+
346
+ InputType :: Dbdelete => db:: delete ( args. db_delete . unwrap ( ) ) ,
339
347
}
340
348
Ok ( ( ) )
341
349
}
You can’t perform that action at this time.
0 commit comments