Copies one or more files.
Copy() can be used to copy a single file:
.Source - String/ArrayOfStrings - (Required)
One or more files to be copied.
.Dest - String - (Required)
Destination for copy:
If a single .Source file is specified, the .Dest can specify the destination filename:
.SourceBasePath - String/ArrayOfStrings - (Required)
Source path to consider as root for copy. Sub-directory structure relative to this path will be replicated during copy.
Will result in the following output structure:
Without .SourceBasePath, the copy result would be:
.PreBuildDependencies - String/ArrayOfStrings - (Optional)
One or more nodes which must be built before this node is built.
The .PreBuildDependencies option ensures the specified targets are up-to-date before the Copy() is executed. This is necessary in situations where multiple files are generated as part of a single build step. Failure to specify these dependencies in this way could allow the Copy() operation to be performed before the source files are updated/generated. This will result in unreliable builds (wrong or missing files) or even build failure (copy attempted while source file is still being written/updated).
For single file targets previously defined in the build, or for files which are present before the build starts (i.e. always on disk, or generated by some process external to the build) this option is unnecessary.