Rebol 程式設計/read
外觀
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!]
]