[io.stream.open-file]

io.stream.open-file is a slot in the io namespace, in Hyperlambda, the language of Magic Cloud. Opens a file as a read-only stream so large files can be processed without loading them into memory; close with [io.stream.close].

  • Value (file-path), required: File path to open as a stream
  • Returns: Resolves to an open file stream

Guide: How to use [io.stream.open-file]

JSON declaration

This is the complete declaration of io.stream.open-file, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "io.stream.open-file",
  "description": "Opens a file as a read-only stream so large files can be processed without loading them into memory; close with [io.stream.close]",
  "signature": {
    "input": {
      "kind": "file-path",
      "description": "File path to open as a stream",
      "required": true,
      "mode": "ValueOrExpression"
    },
    "output": {
      "mode": "Value",
      "kind": "stream",
      "description": "Resolves to an open file stream"
    }
  }
}

← io.stream.close all io.* slots io.stream.read →