FileSetAliases.

GetFileSet(ICakeContext, IEnumerable<string>, bool, DirectoryPath) Method

Summary

Gets a fileset by patterns
Assembly
Cake.FileSet.dll
Namespace
Cake.FileSet
Containing Type
FileSetAliases

Syntax

public static List<FilePath> GetFileSet(this ICakeContext context, IEnumerable<string> patterns, bool caseSensitive = false, DirectoryPath basePath = null)

Examples

Task("GetFileSet.ByPatterns")
  .Does(() => 
  {
     GetFileSet(
        patterns: new string[] {
            "/src/**/*.csproj",
            "!!/src/**/*.Test.csproj"
        }, 
        caseSensitive: false,
        basePath: "D:\code\git\Cake.FileSet"
    );
  });

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
patterns IEnumerable<string> Patterns to match against.
caseSensitive bool Whether the pattern match is case senstive. Optional. Defaults to false.
basePath DirectoryPath Base path to use for the fileset. Optional. The working directory is used if null.

Return Value

Type Description
List<FilePath>