1
0
mirror of https://github.com/jht5945/finding.git synced 2025-12-29 06:00:04 +08:00

add --skip-target-dir

This commit is contained in:
2020-04-28 00:11:34 +08:00
parent 2ce9540577
commit efa006f745
4 changed files with 14 additions and 2 deletions

View File

@@ -201,7 +201,16 @@ fn find_text_files(options: &Options, dir_path: &Path) {
}
return false;
}
if options.skip_target_dir && p_str.ends_with("/target") {
if options.verbose {
clear_n_print_message(MessageType::INFO, &format!("Skip target dir: {}", p_str));
}
return false;
}
if options.skip_dot_dir && p_str.contains("/.") {
if options.verbose {
clear_n_print_message(MessageType::INFO, &format!("Skip dot(.) dir: {}", p_str));
}
return false;
}
if options.skip_link_dir && is_symlink(p) {