Glob.cs 5.1.1490
Glob.cs
Single-source-file path globbing for .NET (netstandard2.0 and net461).
Features
- Choose case sensitivity
- Optionally match only directories
- Injectable file system implementation for easy testing (uses
System.IO.Abstractions) - Can cancel long running match
- Throw or continue on file system errors
- Optionally log errors to supplied log implementation
- Lazy tree traversal
- Option to limit depth of
**expansion
Syntax
?matches a single character*matches zero or more characters**matches zero or more recursive directories, e.g.a\**\xmatchesa\x,a\b\x,a\b\c\x, etc.[...]matches a set of characters, syntax is the same as character groups in Regex.{group1,group2,...}matches any of the pattern groups. Groups can contain groups and patterns, e.g.{a\b,{c,d}*}.
Usage
Install the NuGet package Glob.cs. Then:
var dlls = Glob.Expand(@"c:\windows\system32\**\*.dll");
No packages depend on Glob.cs.
.NET Framework 4.6.1
- System.IO.Abstractions (>= 20.0.15)
- System.IO.Abstractions.TestingHelpers (>= 20.0.15)
.NET Standard 2.0
- System.IO.Abstractions (>= 20.0.15)
- System.IO.Abstractions.TestingHelpers (>= 20.0.15)
| Version | Downloads | Last updated |
|---|---|---|
| 5.1.1643 | 2 | 12/14/2025 |
| 5.1.1625 | 2 | 12/13/2025 |
| 5.1.1491 | 3 | 12/12/2025 |
| 5.1.1490 | 2 | 12/10/2025 |
| 5.1.1253 | 5 | 12/10/2025 |
| 5.1.1198 | 0 | 12/15/2022 |
| 5.1.766 | 0 | 04/18/2021 |
| 5.0.224 | 0 | 01/20/2020 |
| 4.0.166 | 0 | 11/06/2019 |
| 4.0.37 | 2 | 12/13/2025 |
| 3.0.27 | 2 | 12/13/2025 |
| 3.0.26 | 1 | 12/13/2025 |
| 3.0.25 | 0 | 03/07/2019 |
| 2.1.21 | 0 | 12/17/2018 |
| 2.0.13 | 1 | 12/13/2025 |
| 2.0.8 | 3 | 12/11/2025 |
| 1.3.0 | 2 | 12/11/2025 |
| 1.2.0 | 2 | 12/13/2025 |
| 1.1.0 | 1 | 12/10/2025 |
| 1.0.0 | 5 | 12/11/2025 |