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 scan

fs/dir::scan


Parameters

↳ var follow_links: bool = true
↳ var recursive: bool = false

Inputs

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

Outputs

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


Scan dir contents.

Each entry of the dir is streamed through entries. When directory is totally scanned finished is emitted, if without failure completed is emitted, and if failure occurs failed is emitted.

The scanning behavior is set up by the parameters:

  • recursive: set wether subdirectories must be scanned or not,
  • follow_links: set if symbolic links must be followed or not.

When scan errors happen, these are sent through error stream.