Summary
Gets all files matching the specified pattern.
- Namespace
- Cake
.Common .IO - Containing Type
- GlobbingAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Files")]
public static FilePathCollection GetFiles(this ICakeContext context, GlobPattern pattern)
Examples
var files = GetFiles("./**/Cake.*.dll");
foreach(var file in files)
{
Information("File: {0}", file);
}
Attributes
Type | Description |
---|---|
Cake |
An attribute used to mark script method aliases. |
Cake |
An attribute used for documentation of alias methods/properties. |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
pattern | GlobPattern | The glob pattern to match. |
Return Value
Type | Description |
---|---|
FilePathCollection | A FilePathCollection . |