Rebol 编程/read
外观
< Rebol 编程
READ source /binary /string /direct /no-wait /lines /part size /with end-of-line /mode args /custom params /skip length
从文件、URL 或端口规范(块或对象)读取。
READ 是一个原生值。
- 源 -- (类型:文件 URL 对象 块)
- /二进制 -- 准确地保留内容。
- /字符串 -- 翻译所有行终止符。
- /直接 -- 在不缓冲的情况下打开端口。
- /无等待 -- 如果没有数据,则立即返回而不等待。
- /行 -- 将数据处理为行。
- /部分 -- 读取指定数量的数据。
- 大小 -- (类型:数字)
- /使用 -- 指定备用行终止符。
- 行尾 -- (类型:字符 字符串)
- /模式 -- 上面细化的块。
- 参数 -- (类型:块)
- /自定义 -- 允许特殊细化。
- 参数 -- (类型:块)
- /跳过 -- 跳过一定数量的字节。
- 长度 -- (类型:数字)
read: native[
{Reads from a file, url, or port-spec (block or object).}
source [file! url! object! block!]
/binary "Preserves contents exactly."
/string "Translates all line terminators."
/direct "Opens the port without buffering."
/no-wait "Returns immediately without waiting if no data."
/lines "Handles data as lines."
/part "Reads a specified amount of data."
size [number!]
/with "Specifies alternate line termination."
end-of-line [char! string!]
/mode "Block of above refinements."
args [block!]
/custom "Allows special refinements."
params [block!]
/skip "Skips a number of bytes."
length [number!]
]