DirectoryAliases.

DeleteDirectories(ICakeContext, IEnumerable<DirectoryPath>, DeleteDirectorySettings) Method

Summary

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

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Delete")]
public static void DeleteDirectories(this ICakeContext context, IEnumerable<DirectoryPath> directories, DeleteDirectorySettings settings)

Examples

var directoriesToDelete = new DirectoryPath[]{
    Directory("be"),
    Directory("gone")
};
DeleteDirectories(directoriesToDelete, new DeleteDirectorySettings {
    Recursive = true,
    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<DirectoryPath> The directory paths.
settings DeleteDirectorySettings The delete settings.

Return Value

Type Description
void