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 read

fs/file::read


Inputs

⇥ filesystem: Block<FileSystem> (fs/filesystem::FileSystem)
⇥ path: Block<string>

Outputs

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


Read one file.

The content of the file given through path is streamed through data. 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.