Writes the content of each input document to the file system.
graph TD Base0["object"]-->Type Interface0["IModule"]-.->Type click Interface0 "/api/Wyam.Common.Modules/IModule" Type["WriteFiles"] class Type type-node Type-->Derived0["UnwrittenFiles"] click Derived0 "/api/Wyam.Core.Modules.IO/UnwrittenFiles"
public class WriteFiles : IModule
If the metadata keys
RelativeFileDirto be set, usually by the ReadFiles module),
RelativeFilePathto be set, usually by the
WritePathare set on an input document, that value will be used instead of what's specified in the module. For example, if you have a bunch of Razor .cshtml files that need to be rendered to .html files but one of them should be output as a .xml file instead, define the
WriteExtensionmetadata value in the front matter of the page.
Writes the document content to disk with the same file name and relative path
as the input file. This requires metadata for
||Uses a delegate to describe where to write the content of each document. The output of the function should be either a full path to the disk location (including file name) or a path relative to the output folder.|
Writes the document content to disk with the specified extension with the same
base file name and relative path as the input file. This requires metadata
Appends content to each file instead of overwriting them.
This should not be called directly, instead call
Gets the output path of the input document.
Ignores documents with empty content, which is the default behavior.
Indicates that only metadata should be added to the document and a file should not actually be written to the file system. This is useful for preprocessing documents so they appear in a pipeline with the correct write metadata, while actually writing them later with a second
Checks whether the input document should be processed.
By default the metadata values for
Specifies a predicate that must be satisfied for the file to be written.