Summary
Cleans the specified directory.
- Namespace
- Cake
.Common .IO - Containing Type
- DirectoryAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Clean")]
public static void CleanDirectory(this ICakeContext context, DirectoryPath path, Func<IFileSystemInfo, bool> predicate, CleanDirectorySettings settings)
Examples
CleanDirectory("./src/Cake.Common/obj", fileSystemInfo=>!fileSystemInfo.Hidden, new CleanDirectorySettings {
Force = true
});
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. |
path | DirectoryPath | The directory path. |
predicate | Func |
Predicate used to determine which files/directories should get deleted. |
settings | Clean |
The clean settings. |
Return Value
Type | Description |
---|---|
void |