Writes the content of each input document to the file system.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
-
- object
- Module
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 |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
Append |
WriteFiles |
Appends content to each file instead of overwriting them.
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
ExecuteAsync |
Task |
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 |
Task |
Executes the module once for all input documents.
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from Module
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
IgnoreEmptyContent |
WriteFiles |
Ignores documents with empty content, which is the default behavior.
|
ShouldProcessAsync |
Task |
Checks whether the input document should be processed.
|
Where |
WriteFiles |
Specifies a predicate that must be satisfied for the file to be written.
|