On this page
Sommatic Docs
Open portal

Local File System

Read/Write files on host machine.

View as Markdown
Open in
Input and output Available io.local.file Version 1.0.0 Execution: async

Reads, writes, appends, deletes or lists a path on the file system of the host that runs the worker.

How it works

  1. Resolves the config. path, operation (default read), content (default empty) and encoding (default utf8) fall back to the same keys of the incoming payload.
  2. Fails through error when path is empty.
  3. Runs the operation: read returns the file content decoded with encoding; write replaces the file with content; append adds content at the end; delete removes the file; list returns the entry names of a directory.
  4. Returns { result } through out; any file system error leaves through error.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-write-export",
  "label": "Write export",
  "operator_slug": "io.local.file",
  "operator_version": "1.0.0",
  "config": {
    "path": "/data/exports/orders-{{ $json.date }}.csv",
    "operation": "write",
    "content": "{{ $json.csv }}"
  }
}

Configuration

path string Required

Absolute path

operation string Required

Default: read

Allowed values: readwriteappenddeletelist

content string Optional

Content to write/append

encoding string Optional

Default: utf8

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

encoding
Applied only to read. write and append always write UTF-8 text.
path
A relative path is resolved against the working directory of the orchestrator process.

Output ports

out default

The operation succeeded. result is the text for read, an array of names for list, and { written | appended | deleted: true, path } for the others.

Data
{
  "result": {
    "written": true,
    "path": "/data/exports/orders-2026-11-25.csv"
  }
}
error

path is missing, the operation is unknown, or the file system rejected the call.

Data
{
  "error": "ENOENT: no such file or directory, open '/data/exports/missing.csv'"
}

In expressions

What a later node can read from this node's output with $("Local File System").item.json.<path> (write your node's label instead of Local File System). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("Local File System").item.json.resultstring= {…}File content or operation success status
$("Local File System").item.json.result.writtenbooleanNot suggested by the editor= true—
$("Local File System").item.json.result.pathstringNot suggested by the editor= "/data/exports/orders-2026-11-25.csv"—

— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).

Errors

Message Port Cause and fix
path is required error No path in the config nor in the incoming payload. Use an absolute path.
Unsupported operation: <operation> error operation is not read, write, append, delete or list.
ENOENT: no such file or directory, <syscall> '<path>' error The file or its parent directory does not exist on the host. write and append do not create missing directories.
EACCES: permission denied, <syscall> '<path>' error The orchestrator process has no permission on that path.

Input contract

path string Required
operation string Required
content string Optional
encoding string Optional

Output contract

result string Optional

File content or operation success status

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "io.local.file",
  "name": "Local File System",
  "category": "io",
  "version": "1.0.0",
  "description": "Read/Write files on host machine.",
  "capabilities": [
    "fs",
    "local",
    "file"
  ],
  "config_schema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Absolute path"
      },
      "operation": {
        "type": "string",
        "enum": [
          "read",
          "write",
          "append",
          "delete",
          "list"
        ],
        "default": "read"
      },
      "content": {
        "type": "string",
        "description": "Content to write/append"
      },
      "encoding": {
        "type": "string",
        "default": "utf8"
      }
    },
    "required": [
      "path",
      "operation"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string"
      },
      "operation": {
        "type": "string"
      },
      "content": {
        "type": "string"
      },
      "encoding": {
        "type": "string"
      }
    },
    "required": [
      "path",
      "operation"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "result": {
        "type": "string",
        "description": "File content or operation success status"
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Result",
      "description": "FS operation succeeded",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "FS operation failed",
      "is_default": false,
      "supports_condition": false
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "desktop-agent",
    "local-agent"
  ],
  "tags": [
    "local",
    "files"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_link_loom",
    "profile": {
      "name": "Link Loom",
      "verified": true,
      "url": "https://me.veripass.com/link-loom",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Capabilities
fslocalfile
Tags
localfiles

Notes and limits

  • The path refers to the host or container that runs the worker, which may be ephemeral; files written there do not persist across deployments.
  • write overwrites without confirmation and delete is permanent. list does not recurse.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs