REBOL Programming/read

USAGE:Edit

READ source /binary /string /direct /no-wait /lines /part size /with end-of-line /mode args /custom params /skip length 

DESCRIPTION:Edit

Reads from a file, url, or port-spec (block or object).

READ is a native value.

ARGUMENTSEdit

  • source -- (Type: file url object block)

REFINEMENTSEdit

  • /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 -- (Type: number)
  • /with -- Specifies alternate line termination.
    • end-of-line -- (Type: char string)
  • /mode -- Block of above refinements.
    • args -- (Type: block)
  • /custom -- Allows special refinements.
    • params -- (Type: block)
  • /skip -- Skips a number of bytes.
    • length -- (Type: number)

SOURCE CODEEdit

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!]
]
Last modified on 8 March 2014, at 16:41