NuGet ยท nuget

microsoft.extensions.filesystemglobbing

Cached from upstream

Install

Install-Kommandos

dotnet add package microsoft.extensions.filesystemglobbing --version 9.0.0
<PackageReference Include="microsoft.extensions.filesystemglobbing" Version="9.0.0" />
paket add microsoft.extensions.filesystemglobbing --version 9.0.0
Install-Package microsoft.extensions.filesystemglobbing -Version 9.0.0

README

Vorschau

About

<!-- A description of the package and where one can find more documentation -->

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

Key Features

<!-- The key features of this package -->

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

How to Use

<!-- A compelling example on how to use this package with code, as well as any specific guidelines for when to use the package -->

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 in this library -->

The main types provided by this library are:

  • Microsoft.Extensions.FileSystemGlobbing.Matcher

Additional Documentation

<!-- Links to further documentation. Remove conceptual documentation if not available for the library. -->

Feedback & Contributing

<!-- How to provide feedback on this package and contribute to it -->

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