Summary
Copies an existing file to a new file, providing the option to specify a new file name.
- Namespace
- Cake
.Common .IO - Containing Type
- FileAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Copy")]
public static void CopyFile(this ICakeContext context, FilePath filePath, FilePath targetFilePath)
Examples
CopyFile("test.tmp", "test.txt");
Attributes
| Type | Description |
|---|---|
| Cake |
An attribute used to mark script method aliases. |
| Cake |
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 |
