DirectoryAliases Class

Summary

Contains extension methods for working with directories.
Namespace
Cake.Common.IO
Base Types
  • object
graph BT Type-->Base0["object"] Type["DirectoryAliases"] class Type type-node

Syntax

[CakeAliasCategory("Directory Operations")]
public static class DirectoryAliases

Attributes

Type Description
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.

Methods

Name Value Summary
CleanDirectories(ICakeContext, GlobPattern, CleanDirectorySettings) void
Cleans the directories matching the specified pattern. Cleaning the directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, GlobPattern, Func<IFileSystemInfo, bool>, CleanDirectorySettings) void
Cleans the directories matching the specified pattern. Cleaning the directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, GlobPattern, Func<IFileSystemInfo, bool>) void
Cleans the directories matching the specified pattern. Cleaning the directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, GlobPattern) void
Cleans the directories matching the specified pattern. Cleaning the directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, IEnumerable<DirectoryPath>, CleanDirectorySettings) void
Cleans the specified directories. Cleaning a directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, IEnumerable<DirectoryPath>) void
Cleans the specified directories. Cleaning a directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, IEnumerable<string>, CleanDirectorySettings) void
Cleans the specified directories. Cleaning a directory will remove all its content but not the directory itself.
static
CleanDirectories(ICakeContext, IEnumerable<string>) void
Cleans the specified directories. Cleaning a directory will remove all its content but not the directory itself.
static
CleanDirectory(ICakeContext, DirectoryPath, CleanDirectorySettings) void
Cleans the specified directory.
static
CleanDirectory(ICakeContext, DirectoryPath, Func<IFileSystemInfo, bool>, CleanDirectorySettings) void
Cleans the specified directory.
static
CleanDirectory(ICakeContext, DirectoryPath, Func<IFileSystemInfo, bool>) void
Cleans the specified directory.
static
CleanDirectory(ICakeContext, DirectoryPath) void
Cleans the specified directory.
static
CopyDirectory(ICakeContext, DirectoryPath, DirectoryPath) void
Copies the contents of a directory, including subdirectories to the specified location.
static
CreateDirectory(ICakeContext, DirectoryPath) void
Creates the specified directory.
static
DeleteDirectories(ICakeContext, IEnumerable<DirectoryPath>, DeleteDirectorySettings) void
Deletes the specified directories.
static
DeleteDirectories(ICakeContext, IEnumerable<string>, DeleteDirectorySettings) void
Deletes the specified directories.
static
DeleteDirectory(ICakeContext, DirectoryPath, DeleteDirectorySettings) void
Deletes the specified directory.
static
Directory(ICakeContext, string) ConvertableDirectoryPath
Gets a directory path from string.
static
DirectoryExists(ICakeContext, DirectoryPath) bool
Determines whether the given path refers to an existing directory.
static
EnsureDirectoryDoesNotExist(ICakeContext, DirectoryPath, DeleteDirectorySettings) void
Deletes the specified directory if it exists.
static
EnsureDirectoryDoesNotExist(ICakeContext, DirectoryPath, EnsureDirectoryDoesNotExistSettings) void
Deletes the specified directory if it exists.
static
EnsureDirectoryDoesNotExist(ICakeContext, DirectoryPath) void
Deletes the specified directory and its contents if it exists.
static
EnsureDirectoryExists(ICakeContext, DirectoryPath) void
Creates the specified directory if it does not exist.
static
ExpandEnvironmentVariables(ICakeContext, DirectoryPath) DirectoryPath
Expands all environment variables in the provided DirectoryPath.
static
GetSubDirectories(ICakeContext, DirectoryPath) DirectoryPathCollection
Gets a list of all the directories inside a directory.
static
MakeAbsolute(ICakeContext, DirectoryPath) DirectoryPath
Makes the path absolute (if relative) using the current working directory.
static
MakeRelative(ICakeContext, DirectoryPath, DirectoryPath) DirectoryPath
Makes the directory path relative (if absolute) to a specified root directory. If no root directory is defined the current working directory is used as default root.
static
MakeRelative(ICakeContext, FilePath, DirectoryPath) FilePath
Makes the file path relative (if absolute) to a specified root directory. If no root directory is defined the current working directory is used as default root.
static
MoveDirectory(ICakeContext, DirectoryPath, DirectoryPath) void
Moves an existing directory to a new location, providing the option to specify a new directory name.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin