/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
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.
| Argument | Type | Description |
|---|---|---|
file | file | Name of the file to read. |
chunk-size | num | Chunk size to read from the file. Required. Range: 1..32768. |
offset | num | Offset 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 Argument | Type | Description |
|---|---|---|
data | string | The read data returned as a string. |