Glob.cs Save

Path globbing for .NET

Project README

Glob.cs

Version Build status codecov.io netstandard2.0 net461

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\**\x matches a\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");
Open Source Agenda is not affiliated with "Glob.cs" Project. README Source: mganss/Glob.cs
Stars
59
Open Issues
0
Last Commit
3 weeks ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating