Skip to main content
Version: current

read


file/read​

Type: Command

Reads a chunk of a file's contents and returns it as a string in data. Works with files of any size, unlike the contents property, which is limited to just under 60 KiB. See the Files guide.

ArgumentTypeDescription
filefileName of the file to read.
chunk-sizenumChunk size to read from the file. Required. Range: 1..32768.
offsetnumOffset where to start reading the file. A chunk that continues past the end of the file is shortened; an offset past the end fails.
Read-only ArgumentTypeDescription
datastringThe read data returned as a string.