This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Incubator.
Summary
Gets FilePaths using glob patterns
- Assembly
- Cake
.Incubator .dll - Namespace
- Cake
.Incubator .GlobbingExtensions - Containing Type
- GlobbingExtensions
Syntax
public static FilePathCollection GetFiles(this ICakeContext context, params string[] patterns)
Examples
Pass multiple glob patterns
// /output/file.dll
// /output/file.xml
// /output/file.pdb
// /output/another.dll
IEnumerable<FilePath> matchingFiles = GetFiles("*.pdb", "*.xml"));
matchingFiles[0]; // /output/file.xml
matchingFiles[1]; // /output/file.pdb
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | the cake context |
patterns | string[] | the glob patterns |
Return Value
Type | Description |
---|---|
FilePathCollection | the files matching the glob patterns |