Olve.Paths.Glob
0.44.0
dotnet add package Olve.Paths.Glob --version 0.44.0
NuGet\Install-Package Olve.Paths.Glob -Version 0.44.0
<PackageReference Include="Olve.Paths.Glob" Version="0.44.0" />
<PackageVersion Include="Olve.Paths.Glob" Version="0.44.0" />
<PackageReference Include="Olve.Paths.Glob" />
paket add Olve.Paths.Glob --version 0.44.0
#r "nuget: Olve.Paths.Glob, 0.44.0"
#:package Olve.Paths.Glob@0.44.0
#addin nuget:?package=Olve.Paths.Glob&version=0.44.0
#tool nuget:?package=Olve.Paths.Glob&version=0.44.0
Olve.Paths.Glob
Glob pattern matching extension for Olve.Paths. Adds a TryGlob extension method to IPath for finding files using Unix-style wildcard patterns.
Installation
dotnet add package Olve.Paths.Glob
Usage
TryGlob follows the Try-pattern — it returns true when the path is absolute and matches are found:
// ../../tests/Olve.Paths.Tests/GlobReadmeDemo.cs#L18-L22
if (path.TryGlob("*.txt", out var matches))
{
foreach (var match in matches)
Console.WriteLine(match.Path);
}
Recursive patterns
Use ** to match across directory boundaries:
// ../../tests/Olve.Paths.Tests/GlobReadmeDemo.cs#L33-L34
// All .txt files in any subdirectory
path.TryGlob("**/*.txt", out var sourceFiles);
Case-insensitive matching
Pass ignoreCase: true for case-insensitive pattern matching:
// ../../tests/Olve.Paths.Tests/GlobReadmeDemo.cs#L45-L45
path.TryGlob("*.TXT", out var matches, ignoreCase: true);
Hidden file exclusion
Files and directories starting with . are automatically excluded from all glob results. This is not configurable.
API Reference
PathExtensions.TryGlob
public static bool TryGlob(
this IPath path,
string pattern,
out IEnumerable<IPath>? matches,
bool ignoreCase = false)
| Parameter | Description |
|---|---|
path |
The root directory to search within. Must be absolute. |
pattern |
Glob pattern (* matches within a directory, ** matches across directories). |
matches |
Matched file paths, or null if the path is not absolute. |
ignoreCase |
When true, uses case-insensitive matching. Default: false. |
Returns true when the path is absolute and matches were found.
Documentation
Full API reference: https://olivervea.github.io/Olve.Utilities/api/Olve.Paths.Glob.html
License
MIT License © OliverVea
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.0)
- Olve.Paths (>= 0.44.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.44.0 | 104 | 4/17/2026 |
| 0.43.0 | 102 | 4/5/2026 |
| 0.42.0 | 105 | 3/29/2026 |
| 0.41.0 | 204 | 3/28/2026 |
| 0.39.1 | 176 | 3/14/2026 |
| 0.39.0 | 109 | 3/14/2026 |
| 0.38.0 | 278 | 2/19/2026 |
| 0.37.2 | 106 | 2/18/2026 |
| 0.37.1 | 111 | 2/18/2026 |
| 0.37.0 | 109 | 2/17/2026 |
| 0.36.1 | 284 | 11/15/2025 |
| 0.36.0 | 207 | 11/15/2025 |
| 0.35.2 | 180 | 11/9/2025 |
| 0.35.1 | 167 | 11/8/2025 |
| 0.35.0 | 149 | 11/8/2025 |
| 0.34.0 | 159 | 10/4/2025 |
| 0.33.0 | 137 | 9/13/2025 |
| 0.32.2 | 197 | 8/9/2025 |
| 0.32.1 | 196 | 8/9/2025 |
| 0.32.0 | 247 | 8/8/2025 |