Skip to content

Commit 80426d8

Browse files
Microsoft.Extensions.FileSystemGlobbing PACKAGE.md (#93123)
* Microsoft.Extensions.FileSystemGlobbing PACKAGE.md Fill out details for `Microsoft.Extensions.FileSystemGlobbing` NuGet package readme See #92228 * Update src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PACKAGE.md * Update src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PACKAGE.md --------- Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
1 parent 37120cd commit 80426d8

1 file changed

Lines changed: 22 additions & 14 deletions

File tree

  • src/libraries/Microsoft.Extensions.FileSystemGlobbing/src

src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PACKAGE.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,48 @@
22

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

5-
5+
Provides support for matching file system names/paths using [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)).
66

77
## Key Features
88

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

11-
*
12-
*
13-
*
11+
* Contains the `Matcher` type, which can be used to match files in the file system based on user-defined patterns.
1412

1513
## How to Use
1614

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

17+
Get all matching files:
18+
19+
```c#
20+
using Microsoft.Extensions.FileSystemGlobbing;
21+
22+
Matcher matcher = new();
23+
matcher.AddIncludePatterns(new[] { "*.txt", "*.asciidoc", "*.md" });
24+
25+
string searchDirectory = "../starting-folder/";
26+
27+
IEnumerable<string> matchingFiles = matcher.GetResultsInFullPath(searchDirectory);
28+
29+
// Use matchingFiles if there are any found.
30+
// The files in this collection are fully qualified file system paths.
31+
```
32+
1933
## Main Types
2034

2135
<!-- The main types provided in this library -->
2236

2337
The main types provided by this library are:
2438

25-
* ``
26-
* ``
27-
* ``
39+
* `Microsoft.Extensions.FileSystemGlobbing.Matcher`
2840

29-
## Addtional Documentation
41+
## Additional Documentation
3042

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

33-
* [Conceptual documentation](https://learn.microsoft.com/en-us/dotnet/standard/serialization/**LIBRARYNAME**/overview)
34-
* [API documentation](https://learn.microsoft.com/en-us/dotnet/api/**LIBRARYNAME**)
35-
36-
## Related Packages
37-
38-
<!-- The related packages associated with this package -->
45+
* [Conceptual documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/file-globbing)
46+
* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.filesystemglobbing)
3947

4048
## Feedback & Contributing
4149

0 commit comments

Comments
 (0)