-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "findlargedir" | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
authors = ["Dinko Korunic <[email protected]>"] | ||
categories = ["command-line-utilities"] | ||
description = "find all blackhole directories with a huge amount of filesystem entries in a flat structure" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
use clap::Parser; | ||
use clap::ValueHint; | ||
use std::path::PathBuf; | ||
|
||
#[derive(Parser, Debug)] | ||
#[derive(Parser, Default, Debug)] | ||
#[clap(author, version, about, long_about = None)] | ||
pub struct Args { | ||
// TODO: Perform accurate directory entry counting | ||
#[clap(short = 'a', long, action = clap::ArgAction::Set, default_value_t = false)] | ||
pub accurate: bool, | ||
|
||
// Do not cross mount points | ||
#[clap(short = 'o', long, action = clap::ArgAction::Set, default_value_t = true)] | ||
pub one_filesystem: bool, | ||
|
||
// Calibration entry count | ||
#[clap(short = 'c', long, value_parser, default_value_t = crate::calibrate::DEFAULT_TEST_COUNT)] | ||
pub calibration_count: u64, | ||
|
||
#[clap(short = 't', long, value_parser)] | ||
// Calibration path | ||
#[clap(short = 't', long, value_parser, value_hint = ValueHint::AnyPath)] | ||
pub calibration_path: Option<PathBuf>, | ||
|
||
// Alert threshold count: just print the estimate | ||
#[clap(short = 'A', long, value_parser, default_value_t = crate::walk::ALERT_COUNT)] | ||
pub alert_threshold: u64, | ||
|
||
// Blacklist threshold count: print the estimate and stop further deeper scan | ||
#[clap(short = 'B', long, value_parser, default_value_t = crate::walk::BLACKLIST_COUNT)] | ||
pub blacklist_threshold: u64, | ||
|
||
#[clap(required = true, value_parser)] | ||
// Directories to never scan | ||
#[clap(short = 's', long, value_parser, value_hint = ValueHint::AnyPath)] | ||
pub skip_path: Vec<PathBuf>, | ||
|
||
// Paths to perform deep scan on | ||
#[clap(required = true, value_parser, value_hint = ValueHint::AnyPath)] | ||
pub path: Vec<PathBuf>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters