Skip to main content

别名

  • readfileasync

参数

string
必填
File path 会在 separator normalization、workspace-boundary checks 和 filename/extension checks 之后解析到 workspace 内。Absolute paths 只有在解析到 workspace 内时才会被接受。

返回值

string
File contents 会作为带显式长度的 Lua string 返回。null bytes、line endings 和 BOM bytes 等 bytes 不会被 readfile 转换。

示例

从 existing workspace file 读取 bytes。