GlobbingExtensions.

GetFiles(ICakeContext, string[]) Method

Summary

Gets FilePaths using glob patterns

Syntax

public static FilePathCollection GetFiles(this ICakeContext context, params string[] patterns)

Examples

Pass multiple glob patterns
 // /output/file.dll
 // /output/file.xml
 // /output/file.pdb
 // /output/another.dll

 IEnumerable<FilePath> matchingFiles = GetFiles("*.pdb", "*.xml"));

 matchingFiles[0]; // /output/file.xml
 matchingFiles[1]; // /output/file.pdb

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext the cake context
patterns string[] the glob patterns

Return Value

Type Description
FilePathCollection the files matching the glob patterns