XenoAtom.Glob
v1.0.0Latest Stable
net10.0
A high-performance .NET glob library with gitignore compatibility.
Published
Apr 4, 2026
6mo ago
Total Downloads
2.1K
2,080
Install
dotnet add package XenoAtom.Glob --version 1.0.0
| Product | Versions |
|---|---|
| .NET |
README
XenoAtom.Glob

A high-performance .NET glob library with gitignore compatibility.
β¨ Features
- Compiled glob patterns with
*,?, character classes, escapes, and** - Git-compatible ignore parsing for
.gitignoreand.ignore - Repository-aware ignore matching with repository discovery and
core.ignorecasesupport - Low-allocation APIs for hot paths, including
ReadOnlySpan<char>overloads and reusable evaluators - Ignore-aware file tree walking with directory pruning and file metadata capture
- Differential tests against the Git CLI, with
net10+ and NativeAOT support
π Quick Example
using XenoAtom.Glob.Git;
using XenoAtom.Glob.IO;
var repository = RepositoryDiscovery.Discover(@"C:\code\my-repo");
var walker = new FileTreeWalker();
// Walk the working tree while honoring the repository ignore rules.
foreach (var entry in walker.Enumerate(repository.WorkingTreeRoot, new FileTreeWalkOptions
{
RepositoryContext = repository,
}))
{
Console.WriteLine(entry.RelativePath);
}
π User Guide
For more details on how to use XenoAtom.Glob, please visit the user guide.
Thread Safety
GlobPattern,IgnoreRule,IgnoreRuleSet,IgnoreMatcher,RepositoryContext,FileTreeWalkOptions,FileTreeEntry, and parse/evaluation result values are immutable or internally synchronized and can be shared across threads.RepositoryDiscoveryis stateless and can be called concurrently.FileTreeWalkerinstances can start multiple concurrent traversals, but each returned enumeration should be consumed by only one thread at a time.IgnoreMatcherEvaluatoris intentionally reusable but not thread-safe. Create one evaluator per concurrent worker and dispose it when that worker is done.
πͺͺ License
This software is released under the BSD-2-Clause license.
π€ Author
Alexandre Mutel aka xoofx.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.