Microsoft.Extensions.FileSystemGlobbing (8.0.0)

Published 2026-11-23 16:26:44 +00:00 by demo-admin

Installation

dotnet nuget add source --name demo-admin --username your_username --password your_token 
dotnet add package --source demo-admin --version 8.0.0 Microsoft.Extensions.FileSystemGlobbing

About this package

File system globbing to find files matching a specified pattern.

About

Provides support for matching file system names/paths using glob patterns.

Key Features

  • Contains the Matcher type, which can be used to match files in the file system based on user-defined patterns.

How to Use

Get all matching files:

using Microsoft.Extensions.FileSystemGlobbing;

Matcher matcher = new();
matcher.AddIncludePatterns(new[] { "*.txt", "*.asciidoc", "*.md" });

string searchDirectory = "../starting-folder/";

IEnumerable<string> matchingFiles = matcher.GetResultsInFullPath(searchDirectory);

// Use matchingFiles if there are any found.
// The files in this collection are fully qualified file system paths.

Main Types

The main types provided by this library are:

  • Microsoft.Extensions.FileSystemGlobbing.Matcher

Additional Documentation

Feedback & Contributing

Microsoft.Extensions.FileSystemGlobbing is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Details
NuGet
2026-11-23 16:26:44 +00:00
1
Microsoft
189 KiB
Assets (2)
Versions (1) View all
8.0.0 2026-11-23