Olve.Paths.Glob
0.45.0
See the version list below for details.
dotnet add package Olve.Paths.Glob --version 0.45.0
NuGet\Install-Package Olve.Paths.Glob -Version 0.45.0
<PackageReference Include="Olve.Paths.Glob" Version="0.45.0" />
<PackageVersion Include="Olve.Paths.Glob" Version="0.45.0" />
<PackageReference Include="Olve.Paths.Glob" />
paket add Olve.Paths.Glob --version 0.45.0
#r "nuget: Olve.Paths.Glob, 0.45.0"
#:package Olve.Paths.Glob@0.45.0
#addin nuget:?package=Olve.Paths.Glob&version=0.45.0
#tool nuget:?package=Olve.Paths.Glob&version=0.45.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.45.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.63.2 | 631 | 11/13/2026 |
| 0.61.0 | 155 | 10/30/2026 |
| 0.60.0 | 105 | 10/28/2026 |
| 0.59.0 | 105 | 10/28/2026 |
| 0.58.0 | 110 | 10/28/2026 |
| 0.57.0 | 97 | 10/27/2026 |
| 0.56.0 | 104 | 10/26/2026 |
| 0.55.0 | 120 | 9/27/2026 |
| 0.54.0 | 211 | 9/26/2026 |
| 0.53.0 | 116 | 9/26/2026 |
| 0.52.0 | 119 | 9/26/2026 |
| 0.51.0 | 118 | 9/26/2026 |
| 0.50.0 | 133 | 9/21/2026 |
| 0.49.0 | 120 | 9/21/2026 |
| 0.48.0 | 161 | 7/1/2026 |
| 0.47.1 | 137 | 6/29/2026 |
| 0.47.0 | 134 | 6/29/2026 |
| 0.46.0 | 135 | 6/29/2026 |
| 0.45.0 | 139 | 6/28/2026 |
| 0.44.0 | 180 | 4/17/2026 |