DirectoryAliases.

EnsureDirectoryExists(ICakeContext, DirectoryPath) Method

Summary

Creates the specified directory if it does not exist.
Namespace
Cake.Common.IO
Containing Type
DirectoryAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Exists")]
public static void EnsureDirectoryExists(this ICakeContext context, DirectoryPath path)

Examples

EnsureDirectoryExists("publish");

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.
path DirectoryPath The directory path.

Return Value

Type Description
void