FileAliases Class

Summary

Contains functionality related to file operations.
Namespace
Cake.Common.IO
Base Types
  • object
graph BT Type-->Base0["object"] Type["FileAliases"] class Type type-node

Syntax

[CakeAliasCategory("File Operations")]
public static class FileAliases

Attributes

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

Methods

Name Value Summary
CopyFile(ICakeContext, FilePath, FilePath) void
Copies an existing file to a new file, providing the option to specify a new file name.
static
CopyFiles(ICakeContext, GlobPattern, DirectoryPath, bool) void
Copies all files matching the provided pattern to a new location.
static
CopyFiles(ICakeContext, GlobPattern, DirectoryPath) void
Copies all files matching the provided pattern to a new location.
static
CopyFiles(ICakeContext, IEnumerable<FilePath>, DirectoryPath, bool) void
Copies existing files to a new location.
static
CopyFiles(ICakeContext, IEnumerable<FilePath>, DirectoryPath) void
Copies existing files to a new location.
static
CopyFiles(ICakeContext, IEnumerable<string>, DirectoryPath, bool) void
Copies existing files to a new location.
static
CopyFiles(ICakeContext, IEnumerable<string>, DirectoryPath) void
Copies existing files to a new location.
static
CopyFileToDirectory(ICakeContext, FilePath, DirectoryPath) void
Copies an existing file to a new location.
static
DeleteFile(ICakeContext, FilePath) void
Deletes the specified file.
static
DeleteFiles(ICakeContext, GlobPattern) void
Deletes the specified files.
static
DeleteFiles(ICakeContext, IEnumerable<FilePath>) void
Deletes the specified files.
static
ExpandEnvironmentVariables(ICakeContext, FilePath) FilePath
Expands all environment variables in the provided FilePath.
static
File(ICakeContext, string) ConvertableFilePath
Gets a file path from string.
static
FileExists(ICakeContext, FilePath) bool
Determines whether the given path refers to an existing file.
static
FileSize(ICakeContext, FilePath) long
Gets the size of a file in bytes.
static
MakeAbsolute(ICakeContext, FilePath) FilePath
Makes the path absolute (if relative) using the current working directory.
static
MoveFile(ICakeContext, FilePath, FilePath) void
Moves an existing file to a new location, providing the option to specify a new file name.
static
MoveFiles(ICakeContext, GlobPattern, DirectoryPath) void
Moves existing files matching the specified pattern to a new location.
static
MoveFiles(ICakeContext, IEnumerable<FilePath>, DirectoryPath) void
Moves existing files to a new location.
static
MoveFileToDirectory(ICakeContext, FilePath, DirectoryPath) void
Moves an existing file to a new location.
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