Reads the content of files from the file system into the content of new documents.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
-
- object
- Module
- ParallelConfigModule
<IEnumerable <string> >
graph BT
Type-->Base0["ParallelConfigModule<IEnumerable<string>>"]
Base0-->Base1["Module"]
click Base1 "/api/Statiq.Common/Module"
Base1-->Base2["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type-.->Interface1["IParallelModule"]
click Interface1 "/api/Statiq.Common/IParallelModule"
Type["ReadFiles"]
class Type type-node
Syntax
public class ReadFiles : ParallelConfigModule<IEnumerable<string>>, IModule, IParallelModule
Remarks
This module will be executed once and input documents will be ignored if search patterns are specified. Otherwise, if a delegate
is specified, the module will be executed once per input document and the resulting output documents will be
aggregated. In either case, the input documents will not be returned as output of this module.
Source
will be set to the absolute path of the file
(use GetRelativeInputPath()
to get a source path relative to the input folders).
Destination
will be set to the relative path of the file (so that WriteFiles
will write it
to the same relative path in the output folder).
Constructors
Name | Summary |
---|---|
ReadFiles |
Reads all files that match the specified globbing patterns and/or absolute paths. This allows you to specify different patterns and/or paths depending on the input. |
ReadFiles |
Reads all files that match the specified globbing pattern and/or absolute path. This allows you to specify different patterns and/or paths depending on the input. |
ReadFiles |
Reads all files that match the specified globbing patterns and/or absolute paths. |
ReadFiles |
Reads all files that match the specified globbing patterns and/or absolute paths. |
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
|
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
|
ExecuteConfigAsync |
Task |
|
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
|
Where |
ReadFiles |
Specifies a predicate that must be satisfied for the file to be read.
|
WithMediaType |
ReadFiles |
Specifies a function to set the media type for each file.
|