Summary
Gets files matching the specified filter and scope.
- Namespace
- Cake
.Core .IO - Containing Type
- IDirectory
Syntax
IEnumerable<IFile> GetFiles(string filter, SearchScope scope)
Examples
var dir = context.FileSystem.GetDirectory("./artifacts");
dir.Create();
foreach (var child in dir.GetFiles("*.nupkg", SearchScope.Current))
{
Information(child.Path);
}
Parameters
| Name | Type | Description |
|---|---|---|
| filter | string | The filter. |
| scope | SearchScope | The search scope. |
Return Value
| Type | Description |
|---|---|
| IEnumerable |
Files matching the specified filter and scope. |
