Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment readTextLocal

fs/local::readTextLocal


Parameters

↳ var path: string

Inputs

⇥ trigger: Block<void>

Outputs

↦ completed: Block<void>
↦ errors: Stream<string>
↦ failed: Block<void>
↦ finished: Block<void>
↦ reached: Block<void>
↦ text: Stream<string>


Read one file as text on local filesystem.

The content of the file given through path is decoded as UTF-8 and streamed through text.

When file is reached and opened, reached is emitted. Once file is totally and succesfully read, completed is emitted. finished is emitted when the read ends, regardless of the reason. All reading errors are streamed through errors.

If any reading failure happens, failed is emitted.