MCPcopy Index your code
hub / github.com/Gilnaa/globwalk

github.com/Gilnaa/globwalk @v0.9.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.9.1 ↗ · + Follow
36 symbols 112 edges 4 files 16 documented · 44%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GlobWalk

License crates.io

Recursively find files in a directory using globs.

This crate is now in a perpetual maintnance mode and new users should probably cosider using glob.

Comparison to the glob crate

This crate was origially written years ago, when glob was a very differet crate, before it was adopted by the rust-lang org.

Nowadays glob is much better, and overall better maintained, but there are a few features that it does not seem to have (based on glob 0.3.1):

  • The glob crate does not support having {a,b} in patterns.
  • globwalk can match several glob-patterns at the same time.
  • globwalk supports excluding results with !. (negative patterns)
  • glob searches for files in the current working directory, whereas globwalk starts at a specified base-dir.

Usage

To use this crate, add globwalk as a dependency to your project's Cargo.toml:

[dependencies]
globwalk = "0.9.1"

The following piece of code recursively find all png, jpg, or gif files:

extern crate globwalk;

use std::fs;

for img in globwalk::glob("*.{png,jpg,gif}").unwrap() {
    if let Ok(img) = img {
        println!("{:?}", img.path());
    }
}

See the documentation for more details.

Core symbols most depended-on inside this repo

build
called by 11
src/lib.rs
equate_to_expected
called by 11
src/lib.rs
touch
called by 10
src/lib.rs
file_type
called by 6
src/lib.rs
sort_by
called by 3
src/lib.rs
case_insensitive
called by 2
src/lib.rs
glob
called by 2
src/lib.rs
normalize_path_sep
called by 2
src/lib.rs

Shape

Function 18
Method 15
Class 3

Languages

Rust100%

Modules by API surface

src/lib.rs33 symbols
tests/docs.rs1 symbols
src/doctests.rs1 symbols
examples/list.rs1 symbols

For agents

$ claude mcp add globwalk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact