FileAliases.

MoveFile(ICakeContext, FilePath, FilePath) Method

Summary

Moves an existing file to a new location, providing the option to specify a new file name.
Namespace
Cake.Common.IO
Containing Type
FileAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Move")]
public static void MoveFile(this ICakeContext context, FilePath filePath, FilePath targetFilePath)

Examples

MoveFile("test.tmp", "test.txt");

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.
filePath FilePath The file path.
targetFilePath FilePath The target file path.

Return Value

Type Description
void