FileAliases.

CopyFiles(ICakeContext, IEnumerable<FilePath>, DirectoryPath, bool) Method

Summary

Copies existing files to a new location.
Namespace
Cake.Common.IO
Containing Type
FileAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Copy")]
public static void CopyFiles(this ICakeContext context, IEnumerable<FilePath> filePaths, DirectoryPath targetDirectoryPath, bool preserveFolderStructure)

Examples

var files = GetFiles("./**/Cake.*");
CopyFiles(files, "destination");

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.
filePaths IEnumerable<FilePath> The file paths.
targetDirectoryPath DirectoryPath The target directory path.
preserveFolderStructure bool Keep the folder structure.

Return Value

Type Description
void