File Read
Reads a file from the filesystem as a data stream.
This node reads a file from a specified path and provides its content as a data stream.
How it works#
- It attempts to open the resource at the given
path. - If the path points to a file and can be opened, the node provides the file's content on the
dataoutput stream and triggers theSuccessexecution path. - The
existsoutput istrueif a file or directory is found at the path, andfalseotherwise. - The
Errorexecution path is triggered for any of the following reasons: - The file does not exist.
- The process lacks permissions to read the file.
- The path points to a directory instead of a file.
Note: The data output may be populated even if the Error path is triggered (e.g., if the path is a directory). It is safest to only use the data output when the Success path is taken.
Inputs#
| Port | Description |
|---|---|
| Executes the node. | |
| The path to the file to read. |
Outputs#
| Port | Description |
|---|---|
| Executes if the file is valid and ready to be streamed. | |
| Executes if an error occurs (e.g., file not found, is a directory). | |
| True if a file or directory exists at the path. | |
| A data stream of the file's content. |
ID: core/file-read@v1