IO.read

Read a chunk of the stream

{
  "name": "read",
  "description": "Read a chunk of the stream",
  "parameters": [
    {
      "name": "handle",
      "$ref": "StreamHandle",
      "description": "Handle of the stream to read."
    },
    {
      "name": "offset",
      "type": "integer",
      "optional": true,
      "description": "Seek to the specified offset before reading (if not specificed, proceed with offset following the last read)."
    },
    {
      "name": "size",
      "type": "integer",
      "optional": true,
      "description": "Maximum number of bytes to read (left upon the agent discretion if not specified)."
    }
  ],
  "returns": [
    {
      "name": "data",
      "type": "string",
      "description": "Data that were read."
    },
    {
      "name": "eof",
      "type": "boolean",
      "description": "Set if the end-of-file condition occured while reading."
    }
  ]
}