DirectoryExtensions.

GetFiles(IDirectory, string, SearchScope, Func<IFileSystemInfo, bool>, Action<IFileSystemInfo>) Method

Summary

Gets files matching the specified filter and scope.
Namespace
Cake.Core
Containing Type
DirectoryExtensions

Syntax

public static IEnumerable<IFile> GetFiles(this IDirectory directory, string filter, SearchScope scope, Func<IFileSystemInfo, bool> predicate, Action<IFileSystemInfo> action)

Parameters

Name Type Description
directory IDirectory The directory.
filter string The filter.
scope SearchScope The search scope.
predicate Func<IFileSystemInfo, bool> Predicate used to filter files based on file system information.
action Action<IFileSystemInfo> Callback if file gets filtered by predicate.

Return Value

Type Description
IEnumerable<IFile> The files matching the specified filter, scope and predicate.