Reads a file and iterate on each line, returning content as string. Skips empty lines.
- Service:
CleverAge\ProcessBundle\Task\File\LineReaderTask
- Iterable task
Input is ignored
string
: foreach line, it will return content as string.
Underlying method is SplFileObject.
Code | Type | Required | Default | Description |
---|---|---|---|---|
filename |
string |
X | Path of the file to read from (absolute) |
# Task configuration level
code:
service: '@CleverAge\ProcessBundle\Task\File\LineReaderTask'
options:
filename: 'path/to/file.txt'