WriteFiles Class
Writes the content of each input document to the file system.
Namespace
Statiq.Core
Interfaces
Base Types
graph BT Type-->Base0["Module"] click Base0 "/api/Statiq.Common/Module" Base0-->Base1["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type["WriteFiles"] class Type type-node

Syntax

public class WriteFiles : Module, IModule

Remarks

Writes files to the location specified by Destination. If the destination path is relative, the document will be written to the output folder at the relative location. If the destination path is absolute, the document will be written to the absolute location. Use the SetDestination module to set the document destination prior to using this module.

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
Append(bool) WriteFiles
Appends content to each file instead of overwriting them.
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module.
Inherited from Module
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
IgnoreEmptyContent(bool) WriteFiles
Ignores documents with empty content, which is the default behavior.
ShouldProcessAsync(IDocument, IExecutionContext) Task<bool>
Checks whether the input document should be processed.
Where(Config<bool>) WriteFiles
Specifies a predicate that must be satisfied for the file to be written.

Extension Methods