GetFiles(IDirectory, IEnumerable<string>) Method
Gets files from the specified directory using globbing patterns.
Namespace
Statiq.Common
Containing Type
Globber

Syntax

public static IEnumerable<IFile> GetFiles(IDirectory directory, IEnumerable<string> patterns)

Remarks

Note that the provided patterns will be combined and any exclusions will apply to all other provided patterns. If they should be evaluated in isolation, multiple calls should be performed. Initially based on code from Reliak.FileSystemGlobbingExtensions (https://github.com/reliak/Reliak.FileSystemGlobbingExtensions).

Parameters

Name Type Description
directory IDirectory The directory to search.
patterns IEnumerable<string> The globbing pattern(s) to use.

Return Value

Type Description
IEnumerable<IFile> Files that match the globbing pattern(s).