Summary
Gets all files matching the specified pattern.
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Files")]
public static FilePathCollection GetFiles(this ICakeContext context, GlobPattern pattern, GlobberSettings settings)
Examples
Func<IFileSystemInfo, bool> exclude_node_modules =
fileSystemInfo => !fileSystemInfo.Path.FullPath.EndsWith(
"node_modules", StringComparison.OrdinalIgnoreCase);
var files = GetFiles("./**/Cake.*.dll", new GlobberSettings { Predicate = exclude_node_modules });
foreach(var file in files)
{
Information("File: {0}", file);
}
Attributes
Parameters
Return Value