IFile.

Copy(FilePath, bool) Method

Summary

Copies the file to the specified destination path.
Namespace
Cake.Core.IO
Containing Type
IFile

Syntax

void Copy(FilePath destination, bool overwrite)

Examples

var file = context.FileSystem.GetFile("./README.md");
file.Copy("./artifacts/README.md", overwrite: true);

Parameters

Name Type Description
destination FilePath The destination path.
overwrite bool Will overwrite existing destination file if set to true.

Return Value

Type Description
void