Summary
Cleans the directories matching the specified pattern.
Cleaning the directory will remove all its content but not the directory itself.
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Clean")]
public static void CleanDirectories(this ICakeContext context, GlobPattern pattern, Func<IFileSystemInfo, bool> predicate, CleanDirectorySettings settings)
Examples
Func<IFileSystemInfo, bool> exclude_node_modules =
fileSystemInfo=>!fileSystemInfo.Path.FullPath.EndsWith(
"node_modules",
StringComparison.OrdinalIgnoreCase);
CleanDirectories("./src/**/bin/debug", exclude_node_modules, new CleanDirectorySettings() { Force = true });
Attributes
Parameters
Return Value