blokboard/ Open app

Node reference

Read file

Read an opened file by line or all at once

FilesfileRead

Read an opened file by line or all at once

Part of Files / Files. This reference is generated from the node definitions shipped with Blokboard.

When to use it#

  • Read the contents of an opened text file.

Parameters#

ParameterField typeDefaultDescription
File (file)file-reference{{file.output}}Opened file to read.
Read mode (mode)selectline
Encoding (encoding)selectutf-8
On failure (onFailure)selectstopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts (retryCount)number0How many additional attempts to make after the first failure.

Read mode: Choices: One line per execution (line), All lines in one execution (all).

Encoding: Choices: UTF-8 (utf-8), Windows-1252 (windows-1252), UTF-16 LE (utf-16le). Available under More options.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0; no declared maximum.

Inputs#

PortValueDescription
inanyTrigger or an opened file reference.

Outputs#

PortValueDescription
outanyOne line execution, or one execution containing all lines.
doneobjectEmitted after every read execution and its downstream path complete.

out fields#

FieldTypeDescription
linestringCurrent line.
lineNumbernumberCurrent line number, starting at 1.
linesarrayEvery line when Read mode is All lines.
textstringComplete text when Read mode is All lines.
lineCountnumberNumber of lines.

The out port emits a separate execution for each item.

done fields#

FieldTypeDescription
lineCountnumberNumber of lines read.
filefileThe opened runtime file.

The done port waits for the descendant paths of out to finish.

Use in a workflow#

Connect this node to the path that should execute it. Run a small example, inspect its actual output, and use the expression picker to select values for later nodes.

See expressions for mapping values, workflow basics for connections, and troubleshooting for failed runs.