Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
561 changes: 517 additions & 44 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ authors = ["uutils developers"]

[dependencies]
chrono = "0.4.41"
clap = "4.5"
clap = { version = "4.5", features = ["env"] }
faccess = "0.2.4"
walkdir = "2.5"
regex = "1.11"
onig = { version = "6.4", default-features = false }
uucore = { version = "0.0.30", features = ["entries", "fs", "fsext", "mode"] }
nix = { version = "0.30", features = ["fs", "user"] }
argmax = "0.3.1"
itertools = "0.14.0"
quick-error = "2.0.1"
uutests = "0.0.30"
rstest = "0.25.0"

[dev-dependencies]
assert_cmd = "2"
Expand All @@ -33,6 +37,14 @@ pretty_assertions = "1.4.1"
name = "find"
path = "src/find/main.rs"

[[bin]]
name = "locate"
path = "src/locate/main.rs"

[[bin]]
name = "updatedb"
path = "src/updatedb/main.rs"

[[bin]]
name = "xargs"
path = "src/xargs/main.rs"
Expand Down
Binary file added invalid_db
Binary file not shown.
Binary file added old_db
Binary file not shown.
1 change: 1 addition & 0 deletions src/find/matchers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ use std::{
use super::{Config, Dependencies};

pub use entry::{FileType, WalkEntry, WalkError};
pub use regex::RegexType;

/// Symlink following mode.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
// https://opensource.org/licenses/MIT.

pub mod find;
#[cfg(unix)]
pub mod locate;
pub mod updatedb;
pub mod xargs;
17 changes: 17 additions & 0 deletions src/locate/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2017 Google Inc.
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

#[cfg(not(windows))]
fn main() {
let args = std::env::args().collect::<Vec<String>>();
let strs: Vec<&str> = args.iter().map(std::convert::AsRef::as_ref).collect();
std::process::exit(findutils::locate::locate_main(strs.as_slice()));
}

#[cfg(windows)]
fn main() {
println!("locate is unsupported on Windows");
}
Loading
Loading