Olve.Paths.Glob
0.63.2
dotnet add package Olve.Paths.Glob --version 0.63.2
NuGet\Install-Package Olve.Paths.Glob -Version 0.63.2
<PackageReference Include="Olve.Paths.Glob" Version="0.63.2" />
<PackageVersion Include="Olve.Paths.Glob" Version="0.63.2" />
<PackageReference Include="Olve.Paths.Glob" />
paket add Olve.Paths.Glob --version 0.63.2
#r "nuget: Olve.Paths.Glob, 0.63.2"
#:package Olve.Paths.Glob@0.63.2
#addin nuget:?package=Olve.Paths.Glob&version=0.63.2
#tool nuget:?package=Olve.Paths.Glob&version=0.63.2
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.9)
- Olve.Paths (>= 0.63.2)
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.63.2 | 384 | 11/13/2026 |
| 0.61.0 | 150 | 10/30/2026 |
| 0.60.0 | 99 | 10/28/2026 |
| 0.59.0 | 100 | 10/28/2026 |
| 0.58.0 | 102 | 10/28/2026 |
| 0.57.0 | 90 | 10/27/2026 |
| 0.56.0 | 99 | 10/26/2026 |
| 0.55.0 | 114 | 9/27/2026 |
| 0.54.0 | 205 | 9/26/2026 |
| 0.53.0 | 111 | 9/26/2026 |
| 0.52.0 | 112 | 9/26/2026 |
| 0.51.0 | 110 | 9/26/2026 |
| 0.50.0 | 129 | 9/21/2026 |
| 0.49.0 | 118 | 9/21/2026 |
| 0.48.0 | 159 | 7/1/2026 |
| 0.47.1 | 135 | 6/29/2026 |
| 0.47.0 | 132 | 6/29/2026 |
| 0.46.0 | 132 | 6/29/2026 |
| 0.45.0 | 133 | 6/28/2026 |
| 0.44.0 | 177 | 4/17/2026 |