/file/read

read

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.


file/read

Type: Command

读取文件内容的一个块,并以字符串形式返回到 data 中。适用于任意大小的文件,而 contents 属性仅限略低于 60 KiB。请参阅 文件 指南。

参数类型描述
filefile要读取的文件名。
chunk-sizenum从文件中读取的块大小。必需。范围:1..32768。
offsetnum开始读取文件的偏移量。超过文件末尾的块会被缩短;超过末尾的偏移量会失败。
只读参数类型描述
datastring以字符串形式返回的读取数据。