DirectoryAliases.

CleanDirectories(ICakeContext, IEnumerable<string>, CleanDirectorySettings) Method

Summary

Cleans the specified directories. Cleaning a directory will remove all its content but not the directory itself.
Namespace
Cake.Common.IO
Containing Type
DirectoryAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Clean")]
public static void CleanDirectories(this ICakeContext context, IEnumerable<string> directories, CleanDirectorySettings settings)

Examples

var directoriesToClean = new []{
    "./src/Cake/obj",
    "./src/Cake.Common/obj"
};
CleanDirectories(directoriesToClean, new CleanDirectorySettings() { Force = true });

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.
directories IEnumerable<string> The directory paths.
settings CleanDirectorySettings The clean settings.

Return Value

Type Description
void