FakeDirectory.

GetFiles(string, SearchScope) Method

Summary

Gets files matching the specified filter and scope.
Namespace
Cake.Testing
Containing Type
FakeDirectory

Syntax

public 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<IFile> Files matching the specified filter and scope.