Io
| Node | Description | Inputs | Outputs |
|---|---|---|---|
| env_var | Reads an environment variable. | name Text | value Text |
| exec | Runs a shell command and returns its output. | command Text, working_dir Text, timeout_seconds Number | stdout Text, stderr Text, exit_code Number |
| file_exists | Checks whether a file or directory exists at the given path. | path Text | exists Boolean, is_file Boolean, is_dir Boolean |
| list_dir | Lists files in a directory. | path Text, pattern Text | files Json, count Number |
| path_join | Joins path segments into a single path. | base Text, segment Text | path Text |
| path_parse | Splits a file path into its components. | path Text | dirname Text, basename Text, stem Text, extension Text |
| read_file | Reads a text file from disk. | path Text | contents Text |
| write_file | Writes text to a file on disk. | path Text, contents Text | path Text |
env_var
Reads an environment variable.
Inputs:
name(Text) — environment variable name
Output: value (Text) — variable value (empty if unset)
See also: list_dir
exec
Runs a shell command and returns its output.
Inputs:
command(Text) — command to executeworking_dir(Text) — working directory (empty for current)timeout_seconds(Number) — seconds before kill (0 for no limit)
Outputs:
stdout(Text) — standard outputstderr(Text) — standard errorexit_code(Number) — process exit code
file_exists
Checks whether a file or directory exists at the given path.
Inputs:
path(Text) — file or directory path to check
Outputs:
exists(Boolean) — true if the path existsis_file(Boolean) — true if the path is a fileis_dir(Boolean) — true if the path is a directory
list_dir
Lists files in a directory.
Inputs:
path(Text) — directory path to listpattern(Text) — glob pattern (currently unused)
Outputs:
files(Json) — array of file path stringscount(Number) — number of entries found
path_join
Joins path segments into a single path.
Inputs:
base(Text) — base pathsegment(Text) — path segment to append
Output: path (Text) — joined path
path_parse
Splits a file path into its components.
Inputs:
path(Text) — file path to parse
Outputs:
dirname(Text) — parent directorybasename(Text) — file name with extensionstem(Text) — file name without extensionextension(Text) — file extension without dot
See also: path_join, file_exists
read_file
Reads a text file from disk.
Inputs:
path(Text) — absolute or relative file path
Output: contents (Text) — file contents as text
See also: write_file
write_file
Writes text to a file on disk.
Inputs:
path(Text) — destination file pathcontents(Text) — text to write
Output: path (Text) — path that was written to
See also: read_file