DirectoryAliases.

DeleteDirectories(ICakeContext, IEnumerable<string>, bool) Method

Summary

Deletes the specified directories.
Namespace
Cake.Common.IO
Containing Type
DirectoryAliases

Syntax

[Obsolete("Use the overload that accepts DeleteDirectorySettings instead.")]
[CakeMethodAlias]
[CakeAliasCategory("Delete")]
public static void DeleteDirectories(this ICakeContext context, IEnumerable<string> directories, bool recursive = false)

Examples

var directoriesToDelete = new []{
    "be",
    "gone"
};
DeleteDirectories(directoriesToDelete, recursive:true);

Attributes

Type Description
ObsoleteAttribute
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.
recursive bool Will perform a recursive delete if set to true.

Return Value

Type Description
void