DirectoryAliases.

DeleteDirectory(ICakeContext, DirectoryPath, bool) Method

Summary

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

Syntax

[Obsolete("Use the overload that accepts DeleteDirectorySettings instead.")]
[CakeMethodAlias]
[CakeAliasCategory("Delete")]
public static void DeleteDirectory(this ICakeContext context, DirectoryPath path, bool recursive = false)

Examples

DeleteDirectory("./be/gone", 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.
path DirectoryPath The directory path.
recursive bool Will perform a recursive delete if set to true.

Return Value

Type Description
void