GlobbingAliases.

GetPaths(ICakeContext, string, GlobberSettings) Method

Summary

Gets all paths matching the specified pattern.
Namespace
Cake.Common.IO
Containing Type
GlobbingAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Paths")]
public static PathCollection GetPaths(this ICakeContext context, string pattern, GlobberSettings settings)

Examples

 Func<IFileSystemInfo, bool> exclude_node_modules =
     fileSystemInfo => !fileSystemInfo.Path.FullPath.EndsWith(
         "node_modules", StringComparison.OrdinalIgnoreCase);

 var paths = GetPaths("./src/**/obj/*", new GlobberSettings { Predicate = exclude_node_modules });
 foreach(var paths in paths)
 {
     Information("Path: {0}", path);
 }

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.

Parameters

Name Type Description
context ICakeContext The context.
pattern string The glob pattern to match.
settings GlobberSettings The globber settings.

Return Value

Type Description
PathCollection A PathCollection.