CopyFiles.

To(Func<IFile, IFile, FilePath>) Method

Summary

Specifies an alternate destination path for each file (by default files are copied to their same relative path in the output directory). The output of the function should be the full file path (including file name) of the destination file. If the delegate returns null for a particular file, that file will not be copied. This overload allows you to view the Wyam.Common.IO.IFile where the module would normally have copied the file to and then manipulate it (or not) as appropriate.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.IO
Containing Type
CopyFiles

Syntax

public CopyFiles To(Func<IFile, IFile, FilePath> destinationPath)

Parameters

Name Type Description
destinationPath Func<IFile, IFile, FilePath> A delegate that specifies an alternate destination. The first parameter contains the source Wyam.Common.IO.IFile and the second contains an Wyam.Common.IO.IFile representing the calculated destination.

Return Value

Type Description
CopyFiles The current module instance.
GitHub