Reads the whole content of a file, whose path is given as input, and outputs it as a string. Same behaviour as FileReaderTask, except for the file path.
- Service:
CleverAge\ProcessBundle\Task\File\InputFileReaderTask
string: path of the file to read. An \UnexpectedValueException is thrown if the file does not exist or is not
readable.
string: raw content of the file.
Underlying method is file_get_contents.
This task has no option.
- Read every file of a folder
# Task configuration level
entry:
service: '@CleverAge\ProcessBundle\Task\File\FolderBrowserTask'
options:
folder_path: '%kernel.project_dir%/var/data'
outputs: [read]
read:
service: '@CleverAge\ProcessBundle\Task\File\InputFileReaderTask'
outputs: [debug]