Summary
Gets all directories matching the specified pattern.
- Namespace
- Cake
.Common .IO - Containing Type
- GlobbingAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Directories")]
public static DirectoryPathCollection GetDirectories(this ICakeContext context, GlobPattern pattern)
Examples
var directories = GetDirectories("./src/**/obj/*");
foreach(var directory in directories)
{
Information("Directory: {0}", directory);
}
Attributes
Type | Description |
---|---|
Cake |
An attribute used to mark script method aliases. |
Cake |
An attribute used for documentation of alias methods/properties. |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
pattern | GlobPattern | The glob pattern to match. |
Return Value
Type | Description |
---|---|
Directory |
A DirectoryPathCollection . |